Bernhart,
I don't believe you will have any speed gain by using hex over integer, so I suggest use integer all the time. If you try ?rgb(0,255,255) in the command window, you will see 16776960, so instead of rgb(x,y,z), use
the value which the rgb() function gives.
>Naomi,
>
>I have this code
>
> WITH THIS
> TEXT To .cBackColorGrid NOSHOW TEXTMERGE PRETEXT 15
> ICASE(v_AgendaPhar.lgest=.F.,RGB( 251,155,184 ),v_AgendaPhar.sinecessaire,RGB(191,191,255),
> ICASE(nRec = 0,16777215,ICASE( v_AgendaPhar.nRec=1,RGB(255,255,191),RGB(234,244,255))))
> ENDTEXT
>
>
>AND i think that this code run faster..????
>
> WITH THIS
> TEXT To .cBackColorGrid NOSHOW TEXTMERGE PRETEXT 15
> ICASE(v_AgendaPhar.lgest=.F.,RGB( 251,155,184 ),v_AgendaPhar.sinecessaire,RGB(191,191,255),
> ICASE(nRec = 0,16777215,ICASE( v_AgendaPhar.nRec=1,0xC0C0C0,0xFFFFFF)))
> ENDTEXT
>
>
>
>I want dus a foncton That convert RGB(255,255,191 INTO Something such 0xC0C0C0
>
>bernhart
>
>
>>>Hi Naomi,
>>>
>>>Thank for your answer But I' m Sorry , i don't understand....:)
>>>
>>>I Have a RGB() Value and I want something such 0xC0C0C0
>>>
>>>I hoop that it is faster...??
>>>
>>>bernhart
>>>
>>
>>What exactly is the purpose? Where do you need to use HEX re-presentation of the color?
>>
>>RIGHT(TRANSFORM(lnColor, '@0'),6) gives you what you want. How many cases did you test?