用于所有命名 CSS 颜色(bg、颜色、边框、svg 等)的实用程序类的 CSS 模块。 安装 npm install --save named-colors 用法 与Rework/PostCSS 一起使用时效果很好(建议也将它与 uncss 一起使用): @import 'named-colors' ; 整个CSS 样式表可以在index.css找到。 但是,在css/目录中,有各个实用程序的样式表: ...
Modern tree-shakeable CSS named colors utilities: a list of all named colors as names or hex codes, an object of name and hex code pairs, a function to check for named color, a helper union type of all named colors.. Latest version: 1.0.4, last published
/* Named colors */ rebeccapurple aliceblue /* RGB Hexadecimal */ #f09 #ff0099 /* RGB (Red, Green, Blue) */ rgb(255 0 153) rgb(255 0 153 / 80%) /* HSL (Hue, Saturation, Lightness) */ hsl(150 30% 60%) hsl(150 30% 60% / 80%) /* HWB (Hue, Whiteness, Blackness) */...
/* Named colors */ rebeccapurple aliceblue /* RGB Hexadecimal */ #f09 #ff0099 /* RGB (Red, Green, Blue) */ rgb(255 0 153) rgb(255 0 153 / 80%) /* HSL (Hue, Saturation, Lightness) */ hsl(150 30% 60%) hsl(150 30% 60% / 80%) /* HWB (Hue, Whiteness, Blackness) */...
npm install --save is-named-css-color Usage varisNamedCssColor =require('is-named-css-color') isNamedCssColor('tomato')// => trueisNamedCssColor('blue')// => trueisNamedCssColor('rebeccapurple')// => trueisNamedCssColor('foobar')// => false ...
but given the limitations of the 16 base colors mentioned above, browser makers (and now the CSS3 spec, which has adopted the values from the SVG specification) have expanded the range of colors by taking advantage of the X11 extended color palette (which gives us over 100 named colors). ...
By default, CSS has named colors that can be used by typing the name of the color. Here are some examples: .heading{color:brown;color:green;color:black;} Check thefull listof the colors if you are interested. It’s worth mentioning that some color names are not supported in all browser...
Scroll down tosection 6.1 on named coloursand we find this: 16 of CSS’s named colors come from HTML originally: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. Most of the rest come from one version of the X11 c...
or modifying a color’s attributes, there are many circumstances where color manipulation is essential to front-end development. One color format particularly hard to work with is CSS named colors. Named colors are widely supported in A-grade browsers, here’s alist of common named colorscourtesy...
The text-transform CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby.