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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:05:09+00:00 2026-05-27T19:05:09+00:00

I already asked how HSV color pickers work, now I would like to know

  • 0

I already asked how HSV color pickers work, now I would like to know how RGB color pickers with JavaScript work. Those that don’t use the HTML5 Canvas API. Could somebody explain me the concept behind them?

Here is an example of what I mean: http://www.eyecon.ro/colorpicker/

Note: I’m not looking for ready to use jQuery color pickers. I want to develop my own one for learning purposes! jQuery for the solution is fine though!

  • 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-27T19:05:10+00:00Added an answer on May 27, 2026 at 7:05 pm

    Assuming you want to pick RGB values between 0 and 255, similar to the example you are linking to, here’s how I would approach it:

    • Generate 1 static image (1×256 pixels) that contains the ‘rainbow gradient’ shown in the slider on the right
    • Generate 1 static overlay image RGBA image of 256×256 pixels as follows
      • top left: R=1 G=1 B=1 A=1
      • top right: R=0 G=0 B=0 A=0
      • bottom left: R=0 G=0 B=0 A=1
      • bottom right: R=0 G=0 B=0 A=1
    • Use the first image as a background for the slider. It should generate the color to be displayed in the top left corner of the color picker. Use mouse coordinates to find the actual Y value for the color
    • create a ‘background’ div (256×256 px) that has the color picked with the slider. Use the second static image as on overlay div on top of it. With the alpha values it should give you a white and 2 black corners and one corner of the color you need.
    • use the mouse coordinates in that that square. The color will have to be calculated.

    I’m leaving creating the formulas and images to you. 🙂

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

Sidebar

Related Questions

I know a question like this was already asked, but the situation is a
As already asked: how does sort function work in JavaScript, along with the compare
(I know some people already asked questions about js profile, but that's not what
This question was already asked in the context of C#/.Net . Now I'd like
I know I've already asked questions on this, but something that's just confusing. I'm
A similar question was already asked, but for Ubuntu. It would help to know
I know that similar questions were already asked many times but mine differs a
I already asked this question at the JOS-.NET board but Joel is closing that
Searching here I found that this question was already asked , but I think
Please don't confuse with the title as it was already asked by someone but

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.