Laser World
Posted by blogmeister on
July 21, 2013

Laser World should be your first stop when you are looking for rental laser systems, laser control software or any other accessories that you may need for dazzling special effects.
Renting laser systems is much more cost effective because you only need to use them on those certain events and occasions. YOu do not have to worry about maintenance and/or repairs. If something breaks, it is the supplier’s responsibility to provide their customers with working and durable laser systems for rent.
To see is to believe, right? Check out their catalog of laser light systems. Not all of them are for rent. Some, if you want to buy laser light systems are readily available for purchase.
Make sure you drop by their online portal if you want to show laser presentations to your audience.
tags: laser, light, show, system
No Comments
check if color is dark or light using java
Posted by blogmeister on
July 27, 2010
I based this code from Nir’s C# code (owner of NBD Tech). His solution was the best and accurate that I could find compared to other existing methods that checks if a Java Color object is considered dark or light. That is the only tricky part (and vital) in order to identify what foreground color (white or black) should be used depending on the background.
And the Java code below.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
private static int getBrightness(Color c) { return (int) Math.sqrt( c.getRed() * c.getRed() * .241 + c.getGreen() * c.getGreen() * .691 + c.getBlue() * c.getBlue() * .068); } public static Color getForeGroundColorBasedOnBGBrightness(Color color) { if (getBrightness(color) < 130) return Color.white; else return Color.black; } |
The getBrightness() method returns a value from 0-255 where 0 is darkest and 255 is brightest. I purposely set my preferred threshold at 130 to indicate that the color be considered dark while any value above 130 is considered light. You can change your threshold to whatever value suits your taste.
Share the post "check if color is dark or light using java"












