Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static double convertColorPart(double colorPart) {
        colorPart /= 255.0;
        if (colorPart <= 0.03928) {
            return colorPart / 12.92;
        } else {
            return Math.pow(((colorPart + 0.055) / 1.055), 2.4);
        }
    }
}