UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

75 lines (37 loc) 1.15 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [client](./client.md) &gt; [HytopiaUI](./client.hytopiaui.md) &gt; [setEntityColorCorrection](./client.hytopiaui.setentitycolorcorrection.md) ## HytopiaUI.setEntityColorCorrection() method Applies color tint to an entity on the client only (does not affect other players' view). Use for client-side visual effects like highlighting, damage indicators, or team colors. **Signature:** ```typescript setEntityColorCorrection(entityId: number, color: { r: number; g: number; b: number; } | undefined): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> entityId </td><td> number </td><td> ID of the entity to tint </td></tr> <tr><td> color </td><td> { r: number; g: number; b: number; } \| undefined </td><td> RGB color multiplier (0-1 range per channel), or `undefined` to remove tint </td></tr> </tbody></table> **Returns:** void