Questions tagged [color]
Challenge involving processing colors. It can be either for graphical output or manipulation on color codes.
35
questions
0
votes
0
answers
55
views
Getting the full rainbow every rgb or hex color hue [closed]
Output should be a array of hex colors or rgb colors
Here’s my code I made it can also get rgb colors but I wanted to put hex for fun
...
5
votes
4
answers
808
views
A randomly colored walk
Given two inputs, a distance \$d\$ and a number \$n\$ output a list of \$n\$ random colors which each have distance \$d\$ from the previous.
Background
A random walk is a path which is defined by ...
21
votes
59
answers
3k
views
RGB to hexadecimal
Based off a Scratch project
The pen extension in Scratch has a set pen color to () block. The () is normally a color dropdown, ...
-6
votes
6
answers
609
views
I'm Blue, Da ba dee da ba die
Write a program, which outputs I'm Blue, and then Da, Ba, Dee, Da, Ba, Die, forever, the words must be space-seperated in one ...
42
votes
15
answers
3k
views
IE's Extra Robust Color Parsing®
Recently, I've found a rant from 2004 about Internet Explorer's color parsing. Turns out, MS made sure that just about anything will be parsed as a color somehow and I think it makes for a neat ...
0
votes
0
answers
75
views
Invert colors given a hex color code [duplicate]
So the challenge is, given a string containing a hex color code, write a function in any programming language that takes the string and inverts the color, e.g., ...
8
votes
1
answer
395
views
Colorize a diff in unified format
Introduction
git diff is a great way to export patches of the source code, and its outputs are colorized if you don't pass extra arguments to it.
However, when you ...
19
votes
5
answers
1k
views
Generate Green Spray Paint Patterns
This challenge is about creating these neat "green spray paint" patterns: (more pictures below)
Loosely explained, they are generated by starting with a black image and a point in the center. ...
15
votes
8
answers
708
views
Decorate Pascal's Triangle
Although what is a Pascal's triangle is well-known and we already can generate it, the task is now different:
Output \$n\$ first lines of the Pascal's triangle as colored bricks.
Color number is ...
13
votes
7
answers
4k
views
Find the closest HTML colour name
Input
A single hex 6-digit colour code, capital letter, without #. Can also be a 24-bit integer if you prefer.
Output
The closest HTML color name (e.g ...
24
votes
23
answers
4k
views
Find the closest three-digit hex colour
In CSS, colours can be specified by a "hex triplet" - a three byte (six digit) hexadecimal number where each byte represents the red, green, or blue components of the colour. For instance, ...
8
votes
11
answers
2k
views
Color of a Pixel
Write a program that prints the RGB color of a given pixel on the screen.
The program should read a line from stdin in the format x,y, where x and y are unsigned ...
-2
votes
4
answers
401
views
Find the closest RGB color [closed]
Input: A valid 6 HEX digit color code wihout a # prefix
Valid:
000000
FF00FF
ABC123
Your job is to find to which one of these:
...
13
votes
33
answers
4k
views
True color code
True color (24-bit) at Wikipedia is described in pertinent part as
24 bits almost always uses 8 bits of each of R, G, B. As of 2018
24-bit color depth is used by virtually every computer and ...
18
votes
19
answers
2k
views
Read color in my way
Different systems have different ways to describe colors, even if all of them are speaking in R-G-B-A space. A front-end developer who is familiar with CSS may prefer ...
21
votes
42
answers
4k
views
The next colour
Challenge
Consider the rainbow as seven colours, represented by strings as Red Orange Yellow Green Blue Indigo Violet.
Your task is to create a program that ...
14
votes
6
answers
3k
views
RGB to Xterm Color Converter
256-color Xterm-compatible terminals add 240 colors on top of the usual 16 system colors. Colors 16-231 use 6 levels (0, 95, 135, 175, 215, 255) of red, green, and blue, ordered lexicographically. ...
18
votes
10
answers
5k
views
HSL to RGB values
The main purpose of the RGB (Red Green Blue) color model is for the sensing, representation and display of images in electronic systems, such as televisions and computers
HSL (Hue Saturation Lightness)...
4
votes
18
answers
1k
views
Convert RGB color to websafe
Web safe colors are in intervals of 51, they include 0, 3, 6, 9, c, and, f as digits in hex (such as #993333), or 0, 51, 102, 153, 204, 255 in decimal. Your task today is convert a given color to a ...
9
votes
16
answers
2k
views
Convert CMYK values to RGB
Given Color codes in CMYK, convert it to RGB value.
Input:
string of 4 integers(ranging from 0-100) separated by space
86 86 0 43
28 14 0 6
0 41 73 4
Output:
...
13
votes
21
answers
2k
views
How to convert HEX2 to RGBA?
The world of art is full of colour, but the world of the network is even fuller than the world of art of diferent colours and it's renderings. That's why we need to know how to convert one type of ...
49
votes
50
answers
19k
views
Display random colored pixels
I've always liked screens full of randomly colored pixels. They're interesting to look at and the programs that draw them are fun to watch.
The challenge
Fill your screen, or a graphical window, ...
46
votes
25
answers
5k
views
Better Hex Color Codes for Your Internet
Hex triplets such as #ffffff (white) or #3764ef (blueish) are often used to denote RGB colors. They consist of ...
17
votes
21
answers
2k
views
Vacancy or no vacancy?
We've all seen the signs on motels telling us if there's a vacancy or not:
Typically, these will permanently have the letters of VACANCY lit up, and have the letters of NO lit up if there isn't any ...
22
votes
16
answers
5k
views
Extract an RGB channel of an image
Given an image, either as input (possibly in RGB triplets) or with the filename as input (you may assume the image has a specific filename, possibly without an extension), output an image representing ...
23
votes
10
answers
2k
views
Two-Coloring Overlapping Circles
Write a program or function that takes in the following input in a reasonable format of your choice:
Two positive integers W and H that define the width and height of the image you'll be generating.
...
118
votes
62
answers
27k
views
GO OUT AND VOTE
Today is November 8th, 2016, Election Day in the United States of America.
If you are a U.S. citizen eligible to vote, then go out and vote if you haven't already before answering this challenge. Do ...
19
votes
10
answers
978
views
RGB Gradients Generation
The Challenge
Given the two uppercase hexadecimal strings (both 6 characters long, XXXXXX and YYYYYY) representing RGB values (ranging from 000000 to ...
7
votes
14
answers
768
views
Use 16 colors while writing Hey! 4 times
i.e each byte appears in a different ANSI shell colour.
Rules
Resetting the color of the shell after output is not required
Must be output in STDOUT or the primary colour text output of your language....
19
votes
14
answers
4k
views
The Camouflage Color Changing Chameleon Challenge
Chameleon challenges are a bad thing, apparently. Too bad, chameleons are beautiful creatures. Time for a change!
As we all know, many chameleons posses a remarkable ability to blend in with their ...
9
votes
13
answers
2k
views
From Rgb to Cmyk
Given 3 bytes or RGB as input, calculate the nearest CMYK values, and output them.
create either a function with parameters and return value or a program that operates on stdin/stdout
use the color ...
15
votes
11
answers
776
views
Color count, sorted by occurences
This one is simple to describe and I could hardly believe that this was not golfed before:
For a given image (whatever format is supported by your language), find the unique colors and output a list ...
25
votes
3
answers
2k
views
Rainbowlify An Image
This challenge is about gradually shifting hues in an image to make pretty pictures like this:
(original)
Challenge
Write a program or function that takes in two non-negative integers and an image in ...
390
votes
36
answers
71k
views
American Gothic in the palette of Mona Lisa: Rearrange the pixels
You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of ...
460
votes
50
answers
174k
views
Images with all colors
Similar to the images on allrgb.com, make images where each pixel is a unique color (no color is used twice and no color is missing).
Give a program that generates such an image, along with a ...