![]() ![]() In this case, 0% represents black, and 100% represents white.įor example, the purple color we’ve been using throughout this article would look like this in HSL: hsl(276, 100%, 50%). Lastly, lightness uses percentages similarly to saturation. 0 represents black and white, and 100 represents the full color. Saturation uses percentages to define how saturated the color is. On a standard color wheel, red is around 0/360, green is at 120, and blue is at 240. HSL stands for hue, saturation, and lightness. HSL and HSLA ValuesĪnother way to define colors in HTML is to use HSL values. The first two letters specify the intensity of the red color, the middle two numbers specify the intensity of the green color, and the last two set the intensity of the blue color. They consist of numbers from 0 to 9 and letters from A to F. The hex color codes work similarly to RGB codes. HEX Value HEX codes are another easy-to-use color selection option. It ranges from 0 (not transparent) to 1 (fully transparent). The RGBA value adds one more value to the mix, and that’s the alpha value that represents the opacity. The value of each color input can range between 0 and 255, where 0 means the color is not present at all and 255 means that the particular color is at its maximum intensity. The first number specifies the red color input, the second specifies the green color input, and the third specifies blue. The RGB value looks like this: RGB(153,0,255). It defines the color by mixing red, green, and blue values, similarly to how you’d mix a color on an actual palette. Next up, we have the RGB and RGBA values. In other words, if you use a color that’s not on the list of supported colors, you won’t be able to use it in your design by its color name. However, the downside of this approach is that not all color names are supported. For example, you can use “blue” to set the color for an individual element to blue. Currently, there are 140 color names supported, and you can use any of those colors in your styles. The color name refers to the specific name for the HTML color. Color NameĬolor names are the easiest way to define a color in your CSS styles. There are several ways to define color in web design, including name, RGB values, hex codes, and HSL values. but it's a simple edit that can add a lot of personality! ✨□ Click to Tweet When it comes to customizing your site, font color often gets overlooked. We also try to be at that level with our SaaS tool support. Kinsta spoiled me so bad that I demand that level of service from every provider now. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |