HF RL Explorer

RgbToAnsi function returns incorrect color codes after refactoring

RgbToAnsi function returns incorrect color codes after refactoring: a task in harness-adapters: Agentic coding environments (Harbor dataset). The RgbToAnsi function is returning wrong ANSI color codes for RGB values. After some recent changes, the function appears to be using a different algorithm…

The task

The `RgbToAnsi` function is returning wrong ANSI color codes for RGB values. After some recent changes, the function appears to be using a different algorithm that produces incorrect mappings from RGB values to 16-color ANSI codes.

Part of harness-hub/harness-adapters.