[orx-color] Fix misplaced demo comments

This commit is contained in:
Abe Pazos
2025-03-27 15:10:08 +01:00
parent 48a6915846
commit 3ab5c528ca
3 changed files with 21 additions and 5 deletions

View File

@@ -1,9 +1,14 @@
package histogram// Show color histogram of an image
package histogram
import org.openrndr.application
import org.openrndr.draw.loadImage
import org.openrndr.extra.color.statistics.calculateHistogramRGB
/*
* Demonstrates how to generate a palette with the top 32 colors
* of a loaded image, sorted by luminosity. The colors are displayed
* as rectangles overlayed on top of the image.
*/
fun main() = application {
configure {
width = 720

View File

@@ -1,10 +1,14 @@
package histogram// Show color histogram using non-uniform weighting
package histogram
import org.openrndr.application
import org.openrndr.draw.loadImage
import org.openrndr.extra.color.statistics.calculateHistogramRGB
import kotlin.math.pow
/*
* Show the color histogram of an image using non-uniform weighting,
* prioritizing bright colors.
*/
fun main() = application {
configure {
width = 720
@@ -31,4 +35,4 @@ fun main() = application {
}
}
}
}
}

View File

@@ -1,9 +1,16 @@
package histogram// Create a simple rectangle composition based on colors sampled from image
package histogram
import org.openrndr.application
import org.openrndr.draw.loadImage
import org.openrndr.extra.color.statistics.calculateHistogramRGB
/*
* Create a simple grid-like composition based on colors sampled from image.
* The cells are 32 by 32 pixels in size and are filled with a random sample
* taken from the color histogram of the image.
*
* Note: due to its random nature the resulting animation contains flickering colors.
*/
fun main() = application {
configure {
width = 720
@@ -22,4 +29,4 @@ fun main() = application {
}
}
}
}
}