Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mincss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
mincss
Commits
bf099c10
Commit
bf099c10
authored
Oct 02, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in color conversion
parent
675f6414
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
color_names.ml
color_names.ml
+1
-0
simple.ml
simple.ml
+1
-1
No files found.
color_names.ml
View file @
bf099c10
...
@@ -107,6 +107,7 @@ let compress = function
...
@@ -107,6 +107,7 @@ let compress = function
|
Hexcolor
"dda0dd"
->
Ident
"plum"
|
Hexcolor
"dda0dd"
->
Ident
"plum"
|
Ident
"powderblue"
->
Hexcolor
"b0e0e6"
|
Ident
"powderblue"
->
Hexcolor
"b0e0e6"
|
Hexcolor
"800080"
->
Ident
"purple"
|
Hexcolor
"800080"
->
Ident
"purple"
|
Hexcolor
"f00"
->
Ident
"red"
|
Ident
"rosybrown"
->
Hexcolor
"bc8f8f"
|
Ident
"rosybrown"
->
Hexcolor
"bc8f8f"
|
Ident
"royalblue"
->
Hexcolor
"4169e1"
|
Ident
"royalblue"
->
Hexcolor
"4169e1"
|
Ident
"saddlebrown"
->
Hexcolor
"8b4513"
|
Ident
"saddlebrown"
->
Hexcolor
"8b4513"
...
...
simple.ml
View file @
bf099c10
...
@@ -16,7 +16,7 @@ let rec shorten_expr = function
...
@@ -16,7 +16,7 @@ let rec shorten_expr = function
(* #aabbcc -> #abc *)
(* #aabbcc -> #abc *)
|
Hexcolor
h
when
Str
.
string_match
hex6
h
0
->
|
Hexcolor
h
when
Str
.
string_match
hex6
h
0
->
let
gr
n
=
Str
.
matched_group
n
h
in
let
gr
n
=
Str
.
matched_group
n
h
in
Hexcolor
(
gr
1
^
gr
2
^
gr
3
)
shorten_expr
(
Hexcolor
(
gr
1
^
gr
2
^
gr
3
)
)
(* rgb(r,g,b) -> #rrggbb *)
(* rgb(r,g,b) -> #rrggbb *)
|
Function
(
"rgb"
,
Nary
(
","
,
[
r
;
g
;
b
]))
|
Function
(
"rgb"
,
Nary
(
","
,
[
r
;
g
;
b
]))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment