public override ColorBgra Apply(ColorBgra color) { Vector3D vector2 = color.ToPoint3D() - Origin3D; double alpha = (vector2 * AlphaVector) / AlphaVectorLength; return(OutputColor.NewAlpha(Utility.ClampToByte(alpha * 255))); }
/// <summary> /// Returns a Vector3D object where X = other.R - colorBgra.R, /// Y = other.G - colorBgra.G, & Z = other.B - colorBgra.B. Alpha is ignored. /// </summary> /// <returns></returns> public static Vector3D ToVector3D(this ColorBgra colorBgra, ColorBgra other) { return(other.ToPoint3D() - colorBgra.ToPoint3D()); }