In this tutorial, you will learn about color and different types of color value
The color property in CSS is used to set the color of text, the background of the webpage, and also to set the color of borders.
RGB Value:
An RGB color value represents RED, GREEN, and BLUE light sources. In CSS, a color can be specified as an RGB value, using this formula:
rgb(red, green, blue)
Each parameter (red, green, and blue) defines the intensity of the color between 0 and 255.
For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest value (255) and the others are set to 0.
To display black, set all color parameters to 0, like this: rgb(0, 0, 0).
To display white, set all color parameters to 255, like this: rgb(255, 255, 255).
HEX Value:
A hexadecimal color is specified with #RRGGBB, where the RR (red), GG (green), and BB (blue) hexadecimal integers specify the components of the color. In CSS, a color can be specified using a hexadecimal value in the form:#rrggbb
Where rr (red), gg (green), and bb (blue) are hexadecimal values between 00 and ff (same as decimal 0-255).
For example, #ff0000 is displayed as red, because red is set to its highest value (ff) and the others are set to the lowest value (00).
To display black, set all values to 00, like this: #000000.
To display white, set all values to ff, like this: #ffffff.
HSL Value:
HSL stands for hue, saturation, and lightness.
In CSS, a color can be specified using hue, saturation, and lightness (HSL) in the form:
hsl(hue, saturation, lightness)
Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue.
Saturation is a percentage value, 0% means a shade of gray, and 100% is the full color.
Lightness is also a percentage, 0% is black, 50% is neither light nor dark, 100% is white
HSLA Value:
HSLA color values are an extension of HSL color values with an alpha channel - which specifies the opacity of the object.
An HSLA color value is specified with the hsla() function, which has the following syntax:
hsla(hue, saturation, lightness, alpha)
The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).
********************** T I M E S T A M P S **********************
00:00 - Intro
02:03 - Color Name
04:09 - RGB Value
07:38 - HEX Value
09:39 - HSL Value
13:36 - HSLA Value
16:13 - Background Color Property
20:07 - Summary
❇️ I will upload a complete HTML& CSS Tutorial for absolute beginners. If you are entirely new to programming this will give you a step-by-step guide to learning Web Development.
So, subscribe to get notified 🙂 ❇️
Please leave a remark if you have any questions, comments, or feedback, and I will respond as soon as possible. Also, please tell me what you'd like to learn about web development.
#webdevelopment #softwaredevelopment #coding #codersutopia #programming #codewithsatyam
✅ Connect with me
on Youtube: / @codersutopia4589
on Instagram: / codersutopia
Happy Coding :)
Auf dieser Seite können Sie das Online-Video CSS Tutorial | Color in CSS | HTML CSS Tutorial #17 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Coders Utopia 19 August 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 56 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!