BYOND Version: 400.951
Operating System: Windows XP
Web Browser: FF
Video Card (for graphics bugs): ATI Radeon Xpress 200M
Descriptive Problem Summary:
When you swap colors via icon.SwapColor() using rgb(), it ignores colors that have an alpha value that != 255 (eg: Alpha is 101). When the alpha amount is defined in rgb(), such as rgb(r,g,b,101), it will look for only that specific RGB with that certain alpha transparency.
I assume that the procedure is very specific and checking if the RGB of the pixels found == #RRGGBB(AA) so this is why I said I am unsure if it's a bug or not.
Numbered Steps to Reproduce Problem:
Make two states of a certain color, eg: red = rgb(255,0,0), once of them slightly transparent.
Code Snippet (if applicable) to Reproduce Problem:
icon.SwapColor(rgb(255,0,0),rgb(0,0,255))
Expected Results:
Both states (reg. and transparent) would turn from red to blue.
Actual Results:
Just the opaque turns blue. If rgb() was entered with the alpha, only the alpha would be recoloured.
Does the problem occur:
Every time
**As mentioned before, I am not sure if this is a bug or not**
Yes, that is intentional behavior. rgb(r,g,b) is really just a shortcut for rgb(r,g,b,255). There's not any realistic way for SwapColor() to know you really want to change, say, all red to yellow regardless of alpha.
Lummox JR