Because the topic was about the IMP operator there was a focus on bit manipulation in the replies, but you don't need to worry about that if you just want to associate colors with gender.
I had something similar in the example I posted earlier, but
Type Colordata
Col as string
gender as string
End type
Dim Colors(10) as Colordata
Colors(1).Col="Blue"
Colors(1).gender="Male"
That's the simplest form. The array will keep the associated colors and gender together, so you can just manually enter them.
If you really want to have a color *imply* a gender, then you don't need the IMP operator, you can just create a function that checks each color for qualities that determine what gender to associate it with:
Function AssignGender(col as _unsigned long)
Male=1
Female=2
IF _BLUE32(col) > 200 AND _RED32(col) < 200 THEN AssignGender = Male
IF _RED32(col) > 200 AND _BLUE32(col) < 200 THEN AssignGender = Female
END FUNCTION
If you send a 32-bit color value to that function(using
RGB32), then it will perform a simple check and return a result that's either Male(1), Female(2) or neither(0). In this example, a comparatively large amount of blue implies that the color is for males while red implies that it's for females. But you can create whatever conditions you want, and based on what you tell it it will return the appropriate gender for every single 32 bit color.
It's definitely worth looking into how bits work and will help your understanding of what's actually happening in your programs;variable limits, how things work in memory, etc. But for the actual problem in front of you, you should focus on getting it to *work* in the simplest form possible. Once you've done that, you can save the program and slowly improve it to be more efficient, dynamic, procedural etc. See if you can get the program to work using what you already understand, and then do the experimenting safely on top of that or separately.