Results 1 to 2 of 2

Thread: Hex Color Display

  1. #1
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hex Color Display

    I am very new to JavaScript. I know some php but am looking for a way to display the results of a color chooser like this site does.
    If anybody knows where to point me for a start. Id like to learn how this is done without refreshing the browser. I assume the colors values are just passed as a variable from the pallet to the display box....

    Thanks!!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I assume the colors values are just passed as a variable from the pallet to the display box....
    It's a little more complex than that: the colour picker image is crafted in such a way that the saturation and value of any given position can be worked out using its Cartesian coordinates (saturation along X, value along Y). The "dynamic" changing of the main selector area in response to the changing of the hue bar is actually accomplished using a PNG with translucent parts with a solid CSS colour behind.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •