473,414 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Script to cycle through colors in a picture

n00b here. I have a background image in my CSS style sheet that I want
to slowly fade through a couple of colors on my website. Can javascript
selectively choose only one of the colors in the picture? Can this
even be done? Thanks!

Sep 12 '06 #1
2 1352
aka
no there is no way (without using server scripts like php) to get the
color in an image. a workaround could be a solution with xmlhttprequest
- a php scripts gets the colour and a js script uses the result.

Sep 12 '06 #2
ak*@aka-fotos.de wrote:
no there is no way (without using server scripts like php)
to get the color in an image. a workaround could be a
solution with xmlhttprequest - a php scripts gets the
colour and a js script uses the result.
Why use an xml http request? The colors of the image will not change in
real time so if a server side scripting facility exists it could insert
the information directly into the web page and have it available form
the outset. Though I don't see how "use the result" is supposed to work.

Richard.
Sep 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RootShell | last post by:
Hello How can i use the GD Library to only show the White (or the hex value of white) pixels of a image? Imagine i have a 8 color picture in PNG format. This is to use on a color puzzle...
0
by: John F Dutcher | last post by:
Having 'cloned' an existing python script that imports 'string' and uses "string.rstrip()" without incident... I am at a loss to explain why the new 'cloned' script (brief sample below)...
8
by: John Ortt | last post by:
Hi there, I have written the following code to colour cycle the background in one of my forms. The problem is it only cycles from Black to Red and then reverts back to Black. Does anyone...
0
by: mark | last post by:
Somebody can explain me why if I put a color with SetPixel the color showed is of another value? For example: I've to draw a grayscale image. The color RGB(90,90,90) become RGB(40,45,60). In the...
0
by: josemarciano | last post by:
Hi. In an ASP.NET page, I am converting from a TIFF picture, that has a palette of 2 colors (1 bit), to a GIF, using the the code below, and it works fine. The problem is that the GIF always...
4
by: Jmc | last post by:
Hi Need some advice on how to get all colors in an image. I wish to have an input file, in my case it will be a scanned piece of fabric. I would like to first of all gen an array with all the...
4
by: meenu_susi | last post by:
i have different colors for shirt... When I click the blue color the shirt color will change to blue color and Near to that shirt I will have a button as design now when I click that button it...
6
by: mrtaka79 | last post by:
Okay, first of all, I'm a complete noob, so go easy on me. I have this code that works perfectly for me. The only thing I want to add is to randomize the pictures/links that show up. Can anyone...
2
by: orfiyus | last post by:
Hi I am working on a script that that creates charts. So I decided to follow this tutorial using the chart director api. I more or less understand everything going on I just cant seem to find...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.