kaveri Profile picture
Jul 6 12 tweets 5 min read
Colors in CSS Colors in CSS
We can express colors in any of the following 3 formats :

1️⃣rgb ( 255, 0, 0 )

2️⃣#ff0000

3️⃣hsl (9, 100%, 64%)
1️⃣ rgb ( 0, 0, 0 ) --> represents amount of Red , Green, Blue

Each color ranges from 0 to 255

Eg : rgb (255 , 0 , 0) --> displays only red color other two colors
are not displayed color in rgba
We can add transparent property using --> rgba(17, 16, 16, 0.9)

a represents alpha , which can be any value between 0 and 1
where 0 is full transparent and 1 is opaque
2️⃣ #ff0000 --> represents amount of Red , Green, Blue in hexa-decimal , numbers range from zero to f

Eg : #ff0000 --> displays only red color other two colors
are not displayed

We can mention the transparent property by adding 2 digit value at the end
Eg : #ff000010 color in hex
The value of transparent property can vary between 00 to ff

00 is fully transparent and ff is fully opaque
3️⃣ hsl (120 , 100% , 50% ) --> this is again represented in Red Green Blue

H --> Hue is shade of color
S --> Saturation is darkness of color
L --> Lightness of color
Hue is represented as angle of the colors :

0 and 360 = Red
120 = Green
240 = Blue

For further information , this is a good article for the HSL color format

sarasoueidan.com/blog/hex-rgb-t… ImageImage
Saturation is how dark the mentioned color should be it can vary between 0 to 100%

0 is grey and 100 % is darkest version of the mentioned color Image
Lightness value can also vary from 0 to 100%

100% is white because it is the lightest color possible and 0 % is black

when lightness % decreases the color keeps getting closer to black Image
Colors can also be expressed simply using their names :
eg :
color : brown;
background-color : powderblue

But it is recommended to use any of the above ways to represent colors ,

shades of color might differ based on the browser if we mention color names instead of rgb value Image
Thanks for reading .. If you enjoyed this thread then

🔷 Follow me @kaveri04 for more content on web development
🔷 Tell me your thoughts in the comments below ⬇️ and retweet the below tweet , it motivates me to post more awesome content 😍

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with kaveri

kaveri Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @kaveri04

Jul 7
Box-sizing in CSS Image
- Box-sizing is the property where we can mention whether we want to include the padding and border within the total size of the box or not

- box-sizing can have border-box and content-box
- box-sizing : border-box will make sure that total height or width of the box includes the padding and border

Eg : If we mention the height and width of the box 250 px each

and box is given a padding of 30px on 4 sides and border is 30px on all 4 sides
Read 8 tweets
Jun 22
what is rem in CSS ? Image
➡️ rem is a way to mention size , relative to the root element --> <html>

by default the font size of the root is 16 px

Eg : font-size : 1 rem means 16 px

font-size : 2 rem means 2 * 16 px = 32 px
➡️ default font size of the root can be changed using the pseudo-class

: root {
font-size : 10 px;
}

Eg : font-size : 1 rem means 10 px

font-size : 2 rem means 2 * 10 px = 20 px
Read 7 tweets
Jun 6
I got lot of DM s asking for roadmap

Here's a simple roadmap I am following 🧵
🔶HTML
🔖 w3schools.com/html/default.a…

🔶CSS
🔖 w3schools.com/css/default.asp

💡 Pro Tip : Learn basic HTML tags , basic styling in CSS and start building projects. You can learn further concepts on the go

dev.to/frontendmentor…
🔶Java script

🔖 For theory : developer.mozilla.org/en-US/docs/Web…

🔖For building projects : youtube.com/results?search…

🔖 For practice : codewars.com

💡Pro Tip : Build projects using HTML , CSS , Java script all together
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(