Logo
HTMLCSSJavaScriptReactjsnewContactUpdates

Get started today

HTMLCSSJavaScriptReactjsnewContactUpdates

Tools

Resume BuilderQR GeneratorVS Code Editor

Connect

GitHubWhatsApp Channel
css selectors

color-property

By Saket Bhatnagar•June 15, 2025•Beginner to Intermediate

Table of Contents

  1. Color

Color

  1. 1It is used to change the color of the text.
  2. 2

    Syntax :

    1/*By Color Name (Any color name)*/
    2color : red;
    3
    4/* By Hexadecimal Value (Range 0-f)*/
    5color:#00ff00;
    6
    7/*By rgb(r,g,b) (r,g,b range (0-255))*/
    8color:rgb(255,90,0);
    9
    10/* By hsl() (Range : hue (0-360) and saturation,lightness (0-100%))*/
    11color:hsl(20,90%,40%);
    12
    13/* By rgba() (Alpha is used to set the transparency.Range : alpha (0-1)) */
    14color: rgba(0,0,255,0.4);
    15
    16/* By hsla() (Range : alpha (0-1)) */
    17color:hsla(20,90%,40%,0.8);

Share this article

Last updated: July 15, 2025

Join Our Community

Login to Join

© 2025 Saket Bhatnagar. All rights reserved.

    ☕