Generate random colors in SASS SCSS CSS easily. We took some divs in HTML. Applied dynamic value to background color CSS property in SCSS. Used for loop in SCSS to target nth-child and used random SCSS function for the color values to generate beautiful color pellets.
You can learn following things in this video.
- How to generate random colors in SASS / SCSS
- How to assign dynamic value to a CSS property in SASS / SCSS
- How to use for loop in SASS / SCSS
- How to target nth-child in for loop in SASS / SCSS
- How to use random function in SASS / SCSS to generate random color value
- How to use rgba or rgb CSS functions for generate a color
RGBA function takes three color values and alpha value. RGB function takes three color values. We provided it three random colors by using SASS random function. Random is a SASS function that takes upper limit as parameter or argument. Lower limit is 1 if we provide it upper limit. So each random function is generating value from 1 to 255 randomly. And we have beautiful color blocks. On each refresh, different colors will be generated in our document.
Thank You!
???? LIKE VIDEO
???? SUBSCRIBE
???? PRESS BELL ICON
✍️ COMMENT
Channel: https://www.youtube.com/webstylepress
Website: https://www.webstylepress.com
FaceBook: https://www.facebook.com/webstylepress
Twitter: https://twitter.com/webstylepress
GitHub: https://github.com/webstylepress
#webstylepress #sass #scss #css #colors #tools #generators #webdevelopment