- [84+CE] Celtic 565 Color Gradient
- 27 Dec 2024 05:42:06 pm
- Last edited by merthsoft on 21 Jan 2025 03:07:20 pm; edited 4 times in total
I wrote a program to generate a gradient between two colors using Celtic's line drawing with 565 colors.
Code:
For anyone wanting to know how to convert RGB colors into High and Low for drawing purposes, Celtic provides: RGBto565: det(59, r, g, b)
Low btye is in Ans, high bye in Theta.
Here's a blue to green:
Here's a black to red:
Here's blue to red as per the code:
Code:
"|L1 and |L2 contain the two colors"
{0,0,255->|L1
{255,0,0->|L2
For(A,0,240
|L1+(|L2-|L1)*(A/240->|L3
L3(1->R
L3(2->G
L3(3->B
det(59,R,G,B
det(68,Ans,Theta,0,A,320
End
Repeat getKey
End
For anyone wanting to know how to convert RGB colors into High and Low for drawing purposes, Celtic provides: RGBto565: det(59, r, g, b)
Low btye is in Ans, high bye in Theta.
Here's a blue to green:
![](https://i.imgur.com/LcdJpJU.png)
Here's a black to red:
![](https://i.imgur.com/7SnIHUV.png)
Here's blue to red as per the code:
![](https://i.imgur.com/OnaVFFP.png)