Logo
HTMLCSSJavaScriptReactjsnewResourcesContactUpdates
Join

Get started today

HTMLCSSJavaScriptReactjsnewResourcesContactUpdates

Tools

Resume BuilderQR GeneratorVS Code Editor

Connect

GitHubWhatsApp Channel
css selectors

color-property

By Saket Bhatnagar•December 19, 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: January 19, 2026

Saket Bhatnagar

I build products, share the playbooks, and pass along everything I learn so you can ship faster.

GitHubLinkedInYouTubeWhatsApp Channel

Quick Links

  • Updates
  • Resources
  • Resume Builder
  • Contact

WhatsApp

Builders Group

Real-time notes from my builds, weekend challenges, and accountability threads.

Shipping Notes Channel

Launch alerts + bite-sized lessons.

© 2025 Saket Bhatnagar. All rights reserved.

Always building, always learning.