awk (or) UNIX random RGB colors generator?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting awk (or) UNIX random RGB colors generator?
# 1  
Old 09-22-2016
awk (or) UNIX random RGB colors generator?

Dear UNIX Friends,

I was wondering if there is a random RGB color generator or any function in any unix platforms.

Please share your ideas.

Thanks
# 2  
Old 09-22-2016
Code:
$ printf "%02x%02x%02x\n" $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256))
2ae9ae

$

These 2 Users Gave Thanks to Corona688 For This Post:
# 3  
Old 09-22-2016
Add a fourth one and have the Alpha channel too.
CMYK is in there too.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Random Password generator with 2 digits and 6 characters

I am using the below to random generate a password but I need to have 2 numeric characters and 6 alphabetic chars head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '' 6USUvqRB ------ Post updated at 04:43 PM ------ Any Help folks - Can the output be passed onto a sed command to... (9 Replies)
Discussion started by: infernalhell
9 Replies

2. UNIX for Dummies Questions & Answers

A crude random byte generator...

There was an upload recently on generating a pseudo-random file when /dev/random does NOT exist. This does not need /dev/random, /dev/urandom or $RANDOM either... (I assume $RANDOM relies on the /dev/random device in some way.) This code uses hexdump just because I like hexdump for ease of... (2 Replies)
Discussion started by: wisecracker
2 Replies

3. Shell Programming and Scripting

Need specialized random string generator script

Hi, I need a script that will generate a set of random strings in sequence, with the ability to predetermine the length, quantity, and alphabet of individual string, and to use the outputs of earlier strings in the sequence to define the parameters of later strings. For examples, I might want... (5 Replies)
Discussion started by: vajrajames
5 Replies

4. Shell Programming and Scripting

Random Sentence Generator

Hi, I need to create a table with random sentences. I need lines that are upto 1000 characters in lenght. I need a random sentence generator that will create sentences and output it to a text file. The sentences should be of lenght varying from 1 to 1000. Does anyone know how this can be... (7 Replies)
Discussion started by: kaushys
7 Replies

5. Shell Programming and Scripting

awk, shell script reverse engineering app generator - project

Hi, this is fantastic forum for shell programming and scripting, so please let me to introduce you with my very old concept to have web form/s with radio, select, input fields and have an application generating valid, syntax error free scripting code. The same or alike questions are asked... (2 Replies)
Discussion started by: darius2
2 Replies

6. Solaris

Does Solaris have a random number generator?

I am trying to find a way to generate random numbers within a shell script. Does Solaris have a utility that will generate random numbers? Thanks in advance. B (3 Replies)
Discussion started by: one_ring99
3 Replies

7. Programming

Xlib - Mapping Pixel Values to RGB Colors

Hi everyone... I'm working with XLib and I want to find out the pixel value of a particular point on screen and then map it to RGB values. I used XGetImage and XGetPixel to get the pixel value, but how do I get the RGB values of the pixel? I went through a few XLib manuals, there seems to be no... (1 Reply)
Discussion started by: thebin
1 Replies

8. UNIX for Advanced & Expert Users

How to create & use a personal rgb.txt

Greetings -- I'm curious as to an effective way for a user (not root) to set-up a supplemental rgb.txt file for personal use on an X11 system. It's easy to set up the rgb.txt file (with only new colors) in my directory, but how can I use it in addition to the standard rgb.txt file. Thanks.... (0 Replies)
Discussion started by: slapshot_paulie
0 Replies

9. Shell Programming and Scripting

how to make VI editor show colors in Unix

Hi, I saw some people's vi editor show different colors on the text according the nature of text when using it. It would be nice if I can see diffrerent colors with my vi editor. Do anybody know how to set it up? I use PowerTermPro program to access unix machine. I tried to use vim editor but... (7 Replies)
Discussion started by: whatisthis
7 Replies
Login or Register to Ask a Question