Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 800. Similar RGB Color
Given a full 6-digit hex color like "#ABCDEF", find the closest "shorthand" color of the form "#XYZ" (which expands to "#XXYYZZ") by minimizing RGB distance; the optimal solution picks for each 2-digit channel the nearest repeated hex digit value (0x00,0x11, …, 0xFF) independently.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.