View Single Post
Old 05-26-2022, 06:45 PM   #2
OtinG
Old Gadget Guy
OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.OtinG ought to be getting tired of karma fortunes by now.
 
OtinG's Avatar
 
Posts: 1,913
Karma: 6854865
Join Date: Jun 2018
Device: Oasis 3, iPhone 13 Pro Max, iPad mini 6, iPad Air 2020, Alexa Devices
BTW, if you want the wallpaper I created it is easy to make. I put the HTML code in a quote box below. The wallpaper is created by using a small amount of Canvas and Javascript code inside of an HTML file.
  1. Copy the text in the quote box, paste it into a text editor, and save it as something.html.
  2. Open something.html in the Chrome browser, wait for the drawing to finish, place the cursor over the image and right-click, select Save as PNG.

Safari won't allow you to save a Canvas drawing as an image file. The Chrome browser will, so use it instead.

BTW, Each time you load this file and save it as an image, it will be unique because the lengths of the 3,840 color filaments are randomly generated.

Quote:
<!DOCTYPE html>
<html>

<head>
<script>
var hue;
var sat;
var lum;
var hueAdjusted;
var satAdjusted;
var lumAdjusted;
</script>
</head>


<body>

<h1>HSL Color Models Created using Canvas</h1>

<p>&nbsp;</p>

<!-- ----------------------------------------------------------------------------------- ------->
<!-- -----------------------------------------------------HSL FULL SPECTRUM COLORS-- -->
<!-- ----------------------------------------------------------------------------------- ------->
<table class="HSLchart" style="width: 3840px;">
<!--
<tr>
<td style="text-shadow: 1px 1px black; text-align: center; padding: 0px; font-size: 1.5em; font-weight: bold;">
--------------- HSL Primary Colors ---------------<br><br>
</td>
</tr>
-->
<tr>
<td class="HSLchartCell1">
<canvas id="FullSpectrumChart" width="3840" height="2160"></canvas>
<script>
var canvas = document.getElementById('FullSpectrumChart');
sat = 100;

//Create the Black background
var context = canvas.getContext("2d");
context.rect(0, 0, 3841, 2161);
context.fillStyle = 'black';
context.fill();
context.beginPath();

for (horzPixel = 0; horzPixel < 3841; horzPixel++) {
hue = horzPixel * 0.09375;
vertStart = 1060 - Math.floor(Math.random() * 981);
vertEnd = 1100 + Math.floor(Math.random() * 981);
for (vertPixel = vertStart; vertPixel < vertEnd; vertPixel++) {
lum = vertPixel * 0.04629;
if (canvas.getContext)
{
//var context = canvas.getContext("2d");
context.beginPath();
context.rect(horzPixel, vertPixel, 1, 1);
context.fillStyle = 'hsl(' + hue + ',' + sat + '%,' + 50 + '%)';
context.fill();
context.beginPath();
}
}
}
</script>
</td>
</tr>

</table>
<!-- ------------------------------------------------------------------------------------------- -->
<!-- -----------------------------------------------------HSL FULL SPECTRUM COLORS----- -->
<!-- ------------------------------------------------------------------------------------------- -->

<p>&nbsp;</p>


</body>
</html>

Last edited by OtinG; 05-26-2022 at 06:52 PM.
OtinG is offline   Reply With Quote