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 4114112
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:24:49+00:00 2026-05-20T22:24:49+00:00

I have an aplication in which the customer chooses a color. I can’t let

  • 0

I have an aplication in which the customer chooses a color.
I can’t let this color be too light.
Is there a way to see this, to prevent the customer from chosing a color that is too light?

Thank you a lot!


too light in the case is a color almost white….i have a web site with a white background and the user can choose a color through a jquery plugin.

I want to allow the user to choose the color he wants, but cant be too light.

  • 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-20T22:24:49+00:00Added an answer on May 20, 2026 at 10:24 pm

    If contrast is what you are looking for then check out this article.

    They show a function like this to choose text color based on any arbitrary color:

    function isTooLightYIQ(hexcolor){
      var r = parseInt(hexcolor.substr(0,2),16);
      var g = parseInt(hexcolor.substr(2,2),16);
      var b = parseInt(hexcolor.substr(4,2),16);
      var yiq = ((r*299)+(g*587)+(b*114))/1000;
      return yiq >= 128;
    }
    
    // usage:
    element.style.color = isTooLightYIQ('ff0045') ? '#000' : '#fff';
    

    The above function will return true if the color is too light for white text to be readable on top of this color.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a C# desktop application, I have a customer widget which contains a text
I have a application which handles picture chosen from gallery. But there is a
We have an application which uses WAMP server. Now, there is a new requirement
I have a web application which uses URLs that look like this: http://library.example.com/Register.aspx?query=academic&key=586c70bb-5683-419c-aae9-e596af9ab66a (The
I have planned to develop lead tracking software for our business which involves Customer
I have Exe application which will be used by customer application (webrole-Region A) as
We have already shipped a client (.NET WinForms) application which sends customer data to
I have developed a web application in asp.net, there is a page in this
We have an application which we need to allow users from our customer's systems
I have programmed a little application in which you can register and edit your

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.