Here''s a step on the way to "(3#256)#:integer" 

'

I've been thinking of a way to introduce base value in Grade 3. First make
"crayons" with two palettes. Each has10 different colors for each of the  10
digits. The next two images each have 1000 unique rows. Each row is a number
triple of the crayon colors for that palette. 

 

load 'viewmat'

RGB=:0 255{~#:i.8

GRB=:1 0 2{"1 RGB

RGB viewmat i.10

GRB viewmat i.10

base=: 13 :'(3#y)#:i.y^3'

M=:base 10

$M

RGB viewmat M

GRB viewmat M

 

Linda

 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Devon
McCormick
Sent: Thursday, March 5, 2015 10:02 AM
To: J-programming forum
Subject: Re: [Jprogramming] qt platform independent rgb triple integers

 

I assume you know about "(3$256)#: integer", so I'm unsure of the context of
your question.

 

On Thu, Mar 5, 2015 at 9:15 AM, Cliff Reiter <
<mailto:[email protected]> [email protected]> wrote:

 

> Hi,

> Is there a J8.03 an d platform independent way to convert an integer 

> giving an rgb triple into 3 integers giving the rgb levels? Easy to do 

> on any given platform, but if there is a "system" way, platform 

> independence can be carried forward.

> Best, Cliff

> ----------------------------------------------------------------------

> For information about J forums see  <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm

> 

 

 

 

--

Devon McCormick, CFA

----------------------------------------------------------------------

For information about J forums see  <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to