Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. How I can Convert one Color to Another Color

How I can Convert one Color to Another Color

Scheduled Pinned Locked Moved Web Development
csharpjavaasp-nettoolstutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Saba02
    wrote on last edited by
    #1

    Hi all, I have a dynamic menu in asp.net that its BackGround is an colory image that convert dark blue to light blue, but if my menu be longer, this image be repeat more and more... Now how I can convert one color to another color with java script to height of menu? for example dark blue to light blue. Thank You

    Hoda

    N G 2 Replies Last reply
    0
    • S Saba02

      Hi all, I have a dynamic menu in asp.net that its BackGround is an colory image that convert dark blue to light blue, but if my menu be longer, this image be repeat more and more... Now how I can convert one color to another color with java script to height of menu? for example dark blue to light blue. Thank You

      Hoda

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Don't use images, use background-color if possible. Otherwise it depends on your structure. Is the menu one element or is it made up of many elements? Are they table cells, divs, spans??? Could you set the dark blue image as 100% to cover the entire menu then position light blue element where necessary? A lot of ways to skin the cat.


      only two letters away from being an asset

      1 Reply Last reply
      0
      • S Saba02

        Hi all, I have a dynamic menu in asp.net that its BackGround is an colory image that convert dark blue to light blue, but if my menu be longer, this image be repeat more and more... Now how I can convert one color to another color with java script to height of menu? for example dark blue to light blue. Thank You

        Hoda

        G Offline
        G Offline
        Gary Stafford
        wrote on last edited by
        #3

        If I understood your question, you have a background you wish to transition (blend) from one color to another, but want the blend to dynamically scale to the height of the menu. I believe this article will solve your problem, using JavaScript: http://www.elctech.com/snippets/javascript-color-fade-function-find-the-hex-value-between-two-hex-values[^]

        Regards, Gary

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups