Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 459525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:46:54+00:00 2026-05-12T22:46:54+00:00

I am building a web CMS in which the user can choose colours for

  • 0

I am building a web CMS in which the user can choose colours for certain site elements.
I would like to convert all colour values to hex to avoid any further formatting hassle (“rgb(x,y,z)” or named colours). I have found a good JS library for that.

The only thing that I can’t get into hex is “transparent”. I need this when explicitly declaring an element as transparent, which in my experience can be different from not defining any value at all.

Does anybody know whether this can be turned into some numeric form? Will I have to set up all processing instances to accept hex values or “transparent”? I can’t think of any other way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:46:54+00:00Added an answer on May 12, 2026 at 10:46 pm

    Transparency is a property outside the color itself, and it’s also known as alpha component. You can’t code transparency as pure RGB (which stands for red-green-blue channels), but you can use the RGBA notation, in which you define the color + alpha channel together:

    color: rgba(255, 0, 0, 0.5); /* red at 50% opacity */
    

    If you want "transparent", just set the last number to 0, regardless of the color. All of the following result in "transparent" even though the color part is set to 100% red, green and blue respectively:

    color: rgba(255, 0, 0, 0); /* transparent */
    color: rgba(0, 255, 0, 0); /* transparent */
    color: rgba(0, 0, 255, 0); /* transparent */
    

    There’s also the HEXA notation (or RRGGBBAA) now supported on all major browsers, which is pretty much the same as RGBA but using hexadecimal notation instead of decimal:

    color: #FF000080; /* red at 50% opacity */
    

    Additionally, if you just want a transparent background, the simplest way to do it is:

    background: transparent;
    

    You can also play with opacity, although this might be a tad too much and have unwanted side effects in your case:

    .half {
      opacity: 0.5;
      filter: alpha(opacity=50); /* needed to support IE, my sympathies if that's the case */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a CMS where a user can customize the SEO URL of
I am building web applications using Ruby on Rails and I would like to
I'm looking at building basic CMS functionality into our web product and am researching
I'm getting a little tired of building web applications. Feels like same thing over
I'm a lead developer on a project which is building web applications for my
I`m looking for opinion which one is better for building web applications(web sites). I
I'm in the process of building a web cms platform. And I've come to
I'm building a web site for an artist who has had a custom font
I building a simple, 7 page, database driven, website, and I would like to
I have an existing web application which I have been building with an ant

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.