Jump to content

Getclosestcol: Difference between revisions

From EDukeWiki
Jblade (talk | contribs)
Created page with "'''getclosestcol''' <RETURN> <color> <limit> Finds the closest palette index given. <color> is encoded the same as PROJ_FLASH_COLOR <limit> is the index of the last..."
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''getclosestcol''' <[[RETURN]]> <color> <limit>
'''getclosestcol''' <[[RETURN]]> <color> <limit>


Finds the closest palette index given.
Finds the closest palette index to the <color> given.


<color> is encoded the same as [[PROJ_FLASH_COLOR]]
<color> is encoded the same as [[PROJ_FLASH_COLOR]]
Line 8: Line 8:


[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Palette editing]]

Latest revision as of 20:55, 10 March 2026

getclosestcol <RETURN> <color> <limit>

Finds the closest palette index to the <color> given.

<color> is encoded the same as PROJ_FLASH_COLOR

<limit> is the index of the last palette color that should be considered. Use 255 for the whole palette, 254 to exclude the transparent color, 239 to exclude Duke 3D's fullbrights, etc.