Comments (3)
implement color picker in Python for 100 different shades
def rgb_to_hex(red, green, blue):
return "#{:02X}{:02X}{:02X}".format(red, green, blue)
Generate 100 different color shades
colors = []
for i in range(100):
# Vary the red, green, and blue components proportionally
red = int(255 * i / 100)
green = int(255 * i / 100)
blue = int(255 * i / 100)
hex_color = rgb_to_hex(red, green, blue)
colors.append(hex_color)
Print the list of 100 different color shades
for color in colors:
print(color)
from cosc-481w.
function rgbToHex(red, green, blue) {
return #${red.toString(16).padStart(2, '0')}${green.toString(16).padStart(2, '0')}${blue.toString(16).padStart(2, '0')}
;
}
// Generate 100 different color shades
const colors = [];
for (let i = 0; i < 100; i++) {
// Vary the red, green, and blue components independently
const red = Math.floor((255 * i) / 100);
const green = Math.floor((255 * i) / 100);
const blue = Math.floor((255 * i) / 100);
const hexColor = rgbToHex(red, green, blue);
colors.push(hexColor);
}
// Print the list of 100 different color shades
for (const color of colors) {
console.log(color);
}
from cosc-481w.
I pretty much have this implemented in-app.
from cosc-481w.
Related Issues (16)
- Feature Planning HOT 1
- GUI Mockups HOT 3
- Database Initial Work HOT 1
- Research on image processing
- Research on how to do a color picker in Android HOT 2
- Task: GUI button that imports a picture from camera roll (or lists pictures in a gallery)
- Create list of grout information HOT 1
- Standarize on brandards HOT 2
- Educational tasks
- Implement database HOT 1
- Implement database API HOT 2
- Implement initial camera picker prototype
- Mockup/implement the homepage GUI HOT 1
- Implement backend for application
- Add logo and decide on three major colors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosc-481w.