src/main/java/chalmers/pimp/service/ColorConverterService.java
public static IColor fxToIColor(Color fxColor) {
    Objects.requireNonNull(fxColor);

    int max = IColor.MAX_VALUE;
    return ColorFactory.createColor(
        (int) (fxColor.getRed() * max),
        (int) (fxColor.getGreen() * max),
        (int) (fxColor.getBlue() * max),
        (int) (fxColor.getOpacity() * max)
    );
  }
/**
   * Converts the supplied JavaFX color to a IColor.
   *
   * @param fxColor the color that will be converted.
   * @return a IColor that is a copy of the supplied color.
   * @throws NullPointerException if any arguments are {@code null}.
   */
Converts the supplied JavaFX color to a IColor.
@param fxColor the color that will be converted.
@return a IColor that is a copy of the supplied color.
@throws NullPointerException if any arguments are  null.
Converts the supplied JavaFX color to a IColor . @param fxColor the color that will be converted . @return a IColor that is a copy of the supplied color . @throws NullPointerException if any arguments are null .
public static IColor fxToIColor(Color fxColor) {
    Objects.requireNonNull(fxColor);
    int max = IColor.MAX_VALUE;
    return ColorFactory.createColor(
        (int) (fxColor.getRed() * max),
        (int) (fxColor.getGreen() * max),
        (int) (fxColor.getBlue() * max),
        (int) (fxColor.getOpacity() * max)
    );
  }
public static IColor fxToIColor ( Color fxColor ) { Objects . requireNonNull ( fxColor ) ; int max = IColor . MAX_VALUE ; return ColorFactory . createColor ( ( int ) ( fxColor . getRed ( ) * max ) , ( int ) ( fxColor . getGreen ( ) * max ) , ( int ) ( fxColor . getBlue ( ) * max ) , ( int ) ( fxColor . getOpacity ( ) * max ) ) ; }
Converts the supplied JavaFX color to a IColor.
Converts the supplied JavaFX color to a IColor .