Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
3 votes

RGB to hexadecimal

Scratch, 235 Bytes Link to the editor for the script Source: ...
The Empty String Photographer's user avatar
1 vote

RGB to hexadecimal

Scala 3, 65 45 bytes Saved 20 bytes thanks to @The Thonnu Golfed version. Attempt this online! (r,g,b)=>{"#"+"%06x".format(r*65536+g*256+b)} ...
138 Aspen's user avatar
  • 5,951
1 vote

RGB to hexadecimal

Python, 55 Bytes lambda x:'#'+''.join(hex(y)[2:].rjust(2,'0')for y in x) Input is given as an iterable. Iterates through the list, converts to hex, snipps of the <...
The Empty String Photographer's user avatar
1 vote
Accepted

RGB to hexadecimal

Thunno 2 j, 5 bytes Ḥ2ṛ'# Attempt This Online! Explanation ...
The Thonnu's user avatar
  • 18.1k

Only top scored, non community-wiki answers of a minimum length are eligible