-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added 141 X11 web colors, added test for background color
- Loading branch information
1 parent
86b47a5
commit e8a3c02
Showing
6 changed files
with
192 additions
and
11 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
const X11_COLORS = [ | ||
'aliceBlue', | ||
'antiqueWhite', | ||
'aqua', | ||
'aquamarine', | ||
'azure', | ||
'beige', | ||
'bisque', | ||
'black', | ||
'blanchedAlmond', | ||
'blue', | ||
'blueViolet', | ||
'brown', | ||
'burlyWood', | ||
'cadetBlue', | ||
'chartreuse', | ||
'chocolate', | ||
'coral', | ||
'cornflowerBlue', | ||
'cornsilk', | ||
'crimson', | ||
'cyan', | ||
'darkBlue', | ||
'darkCyan', | ||
'darkGoldenrod', | ||
'darkGray', | ||
'darkGreen', | ||
'darkKhaki', | ||
'darkMagenta', | ||
'darkOliveGreen', | ||
'darkOrange', | ||
'darkOrchid', | ||
'darkRed', | ||
'darkSalmon', | ||
'darkSeaGreen', | ||
'darkSlateBlue', | ||
'darkSlateGray', | ||
'darkTurquoise', | ||
'darkViolet', | ||
'deepPink', | ||
'deepSkyBlue', | ||
'dimGray', | ||
'dodgerBlue', | ||
'fireBrick', | ||
'floralWhite', | ||
'forestGreen', | ||
'fuchsia', | ||
'gainsboro', | ||
'ghostWhite', | ||
'gold', | ||
'goldenrod', | ||
'gray', | ||
'green', | ||
'greenYellow', | ||
'honeydew', | ||
'hotPink', | ||
'indianRed', | ||
'indigo', | ||
'ivory', | ||
'khaki', | ||
'lavender', | ||
'lavenderBlush', | ||
'lawnGreen', | ||
'lemonChiffon', | ||
'lightBlue', | ||
'lightCoral', | ||
'lightCyan', | ||
'lightGoldenrodYellow', | ||
'lightGray', | ||
'lightGreen', | ||
'lightPink', | ||
'lightSalmon', | ||
'lightSeaGreen', | ||
'lightSkyBlue', | ||
'lightSlateGray', | ||
'lightSteelBlue', | ||
'lightYellow', | ||
'lime', | ||
'limeGreen', | ||
'linen', | ||
'magenta', | ||
'maroon', | ||
'mediumAquamarine', | ||
'mediumBlue', | ||
'mediumOrchid', | ||
'mediumPurple', | ||
'mediumSeaGreen', | ||
'mediumSlateBlue', | ||
'mediumSpringGreen', | ||
'mediumTurquoise', | ||
'mediumVioletRed', | ||
'midnightBlue', | ||
'mintCream', | ||
'mistyRose', | ||
'moccasin', | ||
'navajoWhite', | ||
'navy', | ||
'oldLace', | ||
'olive', | ||
'oliveDrab', | ||
'orange', | ||
'orangeRed', | ||
'orchid', | ||
'paleGoldenrod', | ||
'paleGreen', | ||
'paleTurquoise', | ||
'paleVioletRed', | ||
'papayaWhip', | ||
'peachPuff', | ||
'peru', | ||
'pink', | ||
'plum', | ||
'powderBlue', | ||
'purple', | ||
'rebeccaPurple', | ||
'red', | ||
'rosyBrown', | ||
'royalBlue', | ||
'saddleBrown', | ||
'salmon', | ||
'sandyBrown', | ||
'seaGreen', | ||
'seashell', | ||
'sienna', | ||
'silver', | ||
'skyBlue', | ||
'slateBlue', | ||
'slateGray', | ||
'snow', | ||
'springGreen', | ||
'steelBlue', | ||
'tan', | ||
'teal', | ||
'thistle', | ||
'tomato', | ||
'turquoise', | ||
'violet', | ||
'wheat', | ||
'white', | ||
'whiteSmoke', | ||
'yellow', | ||
'yellowGreen' | ||
]; | ||
|
||
export default X11_COLORS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import X11_COLORS from './colors'; | ||
|
||
interface StyleObj { [k: string]: string; }; | ||
|
||
const COLOR_STYLES: StyleObj = { }; | ||
for (let c of X11_COLORS) { | ||
// i.e. "Red" | ||
COLOR_STYLES[c] = `color: ${c};`; | ||
// i.e. "bgRed" | ||
COLOR_STYLES[`bg${c[0].toUpperCase()}${c.substring(1)}`] = `background-color: ${c};`; | ||
} | ||
|
||
// const fontStyles: StyleObj = { | ||
// bold: 'font-weight: 500;' | ||
// }; | ||
|
||
export default { | ||
...COLOR_STYLES, | ||
// ...fontStyles | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters