google-apis-sheets_v4 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/google/apis/sheets_v4/classes.rb +1156 -1157
- data/lib/google/apis/sheets_v4/gem_version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 662bd6d22a36875a6282bc3a0f2d4cf0aa1557cc7f21b4096dcf1e53e03bbb4c
|
4
|
+
data.tar.gz: 7b401c6ff3e098904f8f8e39d3b51585704921e362a72d8955429b918881f9b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bf00fcb7b37c9893e0fcade36d377f6c37cadaaf8472544c27eac0de7569fb2b3cac8e7a360dda735367f52b02e7506a93f363871f69d88589ca4301dc74b3a
|
7
|
+
data.tar.gz: 89dc66badfdea9aad810a25415d7c5aee0d88d50758a20da7fec3b1ccbc342c118cd49f0fa314108ba645ab956369ef214c2d58104e39f112e8f388e7a3a598e
|
data/CHANGELOG.md
CHANGED
@@ -676,49 +676,49 @@ module Google
|
|
676
676
|
|
677
677
|
# Represents a color in the RGBA color space. This representation is designed
|
678
678
|
# for simplicity of conversion to/from color representations in various
|
679
|
-
# languages over compactness
|
680
|
-
# be trivially provided to the constructor of
|
681
|
-
# also be trivially provided to UIColor's
|
679
|
+
# languages over compactness. For example, the fields of this representation can
|
680
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
681
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
682
682
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
683
|
-
# CSS
|
683
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
684
684
|
# information about the absolute color space that should be used to interpret
|
685
685
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
686
|
-
# applications
|
687
|
-
#
|
688
|
-
#
|
689
|
-
#
|
690
|
-
#
|
691
|
-
# protocolor.
|
692
|
-
#
|
693
|
-
#
|
694
|
-
# float
|
695
|
-
# float
|
696
|
-
#
|
697
|
-
#
|
698
|
-
#
|
699
|
-
#
|
700
|
-
#
|
701
|
-
#
|
702
|
-
#
|
703
|
-
#
|
704
|
-
#
|
705
|
-
#
|
706
|
-
#
|
707
|
-
#
|
708
|
-
#
|
709
|
-
#
|
710
|
-
#
|
686
|
+
# applications should assume the sRGB color space. When color equality needs to
|
687
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
688
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
689
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
690
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
691
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
692
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
693
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
694
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
695
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
696
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
697
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
698
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
699
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
700
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
701
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
702
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
703
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
704
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
705
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
706
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
707
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
708
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
709
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
710
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
711
711
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
712
712
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
713
713
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
714
|
-
#
|
714
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
715
715
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
716
|
-
# ', alphaFrac, ')'].join(''); `; var
|
717
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
718
|
-
#
|
719
|
-
#
|
720
|
-
#
|
721
|
-
#
|
716
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
717
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
718
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
719
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
720
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
721
|
+
# / ...
|
722
722
|
# Corresponds to the JSON property `firstBandColor`
|
723
723
|
# @return [Google::Apis::SheetsV4::Color]
|
724
724
|
attr_accessor :first_band_color
|
@@ -730,49 +730,49 @@ module Google
|
|
730
730
|
|
731
731
|
# Represents a color in the RGBA color space. This representation is designed
|
732
732
|
# for simplicity of conversion to/from color representations in various
|
733
|
-
# languages over compactness
|
734
|
-
# be trivially provided to the constructor of
|
735
|
-
# also be trivially provided to UIColor's
|
733
|
+
# languages over compactness. For example, the fields of this representation can
|
734
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
735
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
736
736
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
737
|
-
# CSS
|
737
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
738
738
|
# information about the absolute color space that should be used to interpret
|
739
739
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
740
|
-
# applications
|
741
|
-
#
|
742
|
-
#
|
743
|
-
#
|
744
|
-
#
|
745
|
-
# protocolor.
|
746
|
-
#
|
747
|
-
#
|
748
|
-
# float
|
749
|
-
# float
|
750
|
-
#
|
751
|
-
#
|
752
|
-
#
|
753
|
-
#
|
754
|
-
#
|
755
|
-
#
|
756
|
-
#
|
757
|
-
#
|
758
|
-
#
|
759
|
-
#
|
760
|
-
#
|
761
|
-
#
|
762
|
-
#
|
763
|
-
#
|
764
|
-
#
|
740
|
+
# applications should assume the sRGB color space. When color equality needs to
|
741
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
742
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
743
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
744
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
745
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
746
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
747
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
748
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
749
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
750
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
751
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
752
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
753
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
754
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
755
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
756
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
757
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
758
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
759
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
760
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
761
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
762
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
763
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
764
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
765
765
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
766
766
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
767
767
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
768
|
-
#
|
768
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
769
769
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
770
|
-
# ', alphaFrac, ')'].join(''); `; var
|
771
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
772
|
-
#
|
773
|
-
#
|
774
|
-
#
|
775
|
-
#
|
770
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
771
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
772
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
773
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
774
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
775
|
+
# / ...
|
776
776
|
# Corresponds to the JSON property `footerColor`
|
777
777
|
# @return [Google::Apis::SheetsV4::Color]
|
778
778
|
attr_accessor :footer_color
|
@@ -784,49 +784,49 @@ module Google
|
|
784
784
|
|
785
785
|
# Represents a color in the RGBA color space. This representation is designed
|
786
786
|
# for simplicity of conversion to/from color representations in various
|
787
|
-
# languages over compactness
|
788
|
-
# be trivially provided to the constructor of
|
789
|
-
# also be trivially provided to UIColor's
|
787
|
+
# languages over compactness. For example, the fields of this representation can
|
788
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
789
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
790
790
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
791
|
-
# CSS
|
791
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
792
792
|
# information about the absolute color space that should be used to interpret
|
793
793
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
794
|
-
# applications
|
795
|
-
#
|
796
|
-
#
|
797
|
-
#
|
798
|
-
#
|
799
|
-
# protocolor.
|
800
|
-
#
|
801
|
-
#
|
802
|
-
# float
|
803
|
-
# float
|
804
|
-
#
|
805
|
-
#
|
806
|
-
#
|
807
|
-
#
|
808
|
-
#
|
809
|
-
#
|
810
|
-
#
|
811
|
-
#
|
812
|
-
#
|
813
|
-
#
|
814
|
-
#
|
815
|
-
#
|
816
|
-
#
|
817
|
-
#
|
818
|
-
#
|
794
|
+
# applications should assume the sRGB color space. When color equality needs to
|
795
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
796
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
797
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
798
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
799
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
800
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
801
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
802
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
803
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
804
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
805
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
806
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
807
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
808
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
809
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
810
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
811
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
812
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
813
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
814
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
815
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
816
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
817
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
818
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
819
819
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
820
820
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
821
821
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
822
|
-
#
|
822
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
823
823
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
824
|
-
# ', alphaFrac, ')'].join(''); `; var
|
825
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
826
|
-
#
|
827
|
-
#
|
828
|
-
#
|
829
|
-
#
|
824
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
825
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
826
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
827
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
828
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
829
|
+
# / ...
|
830
830
|
# Corresponds to the JSON property `headerColor`
|
831
831
|
# @return [Google::Apis::SheetsV4::Color]
|
832
832
|
attr_accessor :header_color
|
@@ -838,49 +838,49 @@ module Google
|
|
838
838
|
|
839
839
|
# Represents a color in the RGBA color space. This representation is designed
|
840
840
|
# for simplicity of conversion to/from color representations in various
|
841
|
-
# languages over compactness
|
842
|
-
# be trivially provided to the constructor of
|
843
|
-
# also be trivially provided to UIColor's
|
841
|
+
# languages over compactness. For example, the fields of this representation can
|
842
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
843
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
844
844
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
845
|
-
# CSS
|
845
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
846
846
|
# information about the absolute color space that should be used to interpret
|
847
847
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
848
|
-
# applications
|
849
|
-
#
|
850
|
-
#
|
851
|
-
#
|
852
|
-
#
|
853
|
-
# protocolor.
|
854
|
-
#
|
855
|
-
#
|
856
|
-
# float
|
857
|
-
# float
|
858
|
-
#
|
859
|
-
#
|
860
|
-
#
|
861
|
-
#
|
862
|
-
#
|
863
|
-
#
|
864
|
-
#
|
865
|
-
#
|
866
|
-
#
|
867
|
-
#
|
868
|
-
#
|
869
|
-
#
|
870
|
-
#
|
871
|
-
#
|
872
|
-
#
|
848
|
+
# applications should assume the sRGB color space. When color equality needs to
|
849
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
850
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
851
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
852
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
853
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
854
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
855
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
856
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
857
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
858
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
859
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
860
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
861
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
862
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
863
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
864
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
865
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
866
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
867
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
868
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
869
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
870
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
871
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
872
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
873
873
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
874
874
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
875
875
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
876
|
-
#
|
876
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
877
877
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
878
|
-
# ', alphaFrac, ')'].join(''); `; var
|
879
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
880
|
-
#
|
881
|
-
#
|
882
|
-
#
|
883
|
-
#
|
878
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
879
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
880
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
881
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
882
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
883
|
+
# / ...
|
884
884
|
# Corresponds to the JSON property `secondBandColor`
|
885
885
|
# @return [Google::Apis::SheetsV4::Color]
|
886
886
|
attr_accessor :second_band_color
|
@@ -923,49 +923,49 @@ module Google
|
|
923
923
|
|
924
924
|
# Represents a color in the RGBA color space. This representation is designed
|
925
925
|
# for simplicity of conversion to/from color representations in various
|
926
|
-
# languages over compactness
|
927
|
-
# be trivially provided to the constructor of
|
928
|
-
# also be trivially provided to UIColor's
|
926
|
+
# languages over compactness. For example, the fields of this representation can
|
927
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
928
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
929
929
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
930
|
-
# CSS
|
930
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
931
931
|
# information about the absolute color space that should be used to interpret
|
932
932
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
933
|
-
# applications
|
934
|
-
#
|
935
|
-
#
|
936
|
-
#
|
937
|
-
#
|
938
|
-
# protocolor.
|
939
|
-
#
|
940
|
-
#
|
941
|
-
# float
|
942
|
-
# float
|
943
|
-
#
|
944
|
-
#
|
945
|
-
#
|
946
|
-
#
|
947
|
-
#
|
948
|
-
#
|
949
|
-
#
|
950
|
-
#
|
951
|
-
#
|
952
|
-
#
|
953
|
-
#
|
954
|
-
#
|
955
|
-
#
|
956
|
-
#
|
957
|
-
#
|
933
|
+
# applications should assume the sRGB color space. When color equality needs to
|
934
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
935
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
936
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
937
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
938
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
939
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
940
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
941
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
942
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
943
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
944
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
945
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
946
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
947
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
948
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
949
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
950
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
951
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
952
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
953
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
954
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
955
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
956
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
957
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
958
958
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
959
959
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
960
960
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
961
|
-
#
|
961
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
962
962
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
963
|
-
# ', alphaFrac, ')'].join(''); `; var
|
964
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
965
|
-
#
|
966
|
-
#
|
967
|
-
#
|
968
|
-
#
|
963
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
964
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
965
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
966
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
967
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
968
|
+
# / ...
|
969
969
|
# Corresponds to the JSON property `negativeColor`
|
970
970
|
# @return [Google::Apis::SheetsV4::Color]
|
971
971
|
attr_accessor :negative_color
|
@@ -982,49 +982,49 @@ module Google
|
|
982
982
|
|
983
983
|
# Represents a color in the RGBA color space. This representation is designed
|
984
984
|
# for simplicity of conversion to/from color representations in various
|
985
|
-
# languages over compactness
|
986
|
-
# be trivially provided to the constructor of
|
987
|
-
# also be trivially provided to UIColor's
|
985
|
+
# languages over compactness. For example, the fields of this representation can
|
986
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
987
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
988
988
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
989
|
-
# CSS
|
989
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
990
990
|
# information about the absolute color space that should be used to interpret
|
991
991
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
992
|
-
# applications
|
993
|
-
#
|
994
|
-
#
|
995
|
-
#
|
996
|
-
#
|
997
|
-
# protocolor.
|
998
|
-
#
|
999
|
-
#
|
1000
|
-
# float
|
1001
|
-
# float
|
1002
|
-
#
|
1003
|
-
#
|
1004
|
-
#
|
1005
|
-
#
|
1006
|
-
#
|
1007
|
-
#
|
1008
|
-
#
|
1009
|
-
#
|
1010
|
-
#
|
1011
|
-
#
|
1012
|
-
#
|
1013
|
-
#
|
1014
|
-
#
|
1015
|
-
#
|
1016
|
-
#
|
992
|
+
# applications should assume the sRGB color space. When color equality needs to
|
993
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
994
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
995
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
996
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
997
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
998
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
999
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1000
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1001
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1002
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1003
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1004
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1005
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1006
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1007
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1008
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1009
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1010
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1011
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1012
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1013
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1014
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1015
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1016
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1017
1017
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1018
1018
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1019
1019
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1020
|
-
#
|
1020
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1021
1021
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1022
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1023
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1024
|
-
#
|
1025
|
-
#
|
1026
|
-
#
|
1027
|
-
#
|
1022
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1023
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1024
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1025
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1026
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1027
|
+
# / ...
|
1028
1028
|
# Corresponds to the JSON property `positiveColor`
|
1029
1029
|
# @return [Google::Apis::SheetsV4::Color]
|
1030
1030
|
attr_accessor :positive_color
|
@@ -1139,49 +1139,49 @@ module Google
|
|
1139
1139
|
|
1140
1140
|
# Represents a color in the RGBA color space. This representation is designed
|
1141
1141
|
# for simplicity of conversion to/from color representations in various
|
1142
|
-
# languages over compactness
|
1143
|
-
# be trivially provided to the constructor of
|
1144
|
-
# also be trivially provided to UIColor's
|
1142
|
+
# languages over compactness. For example, the fields of this representation can
|
1143
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1144
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1145
1145
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1146
|
-
# CSS
|
1146
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1147
1147
|
# information about the absolute color space that should be used to interpret
|
1148
1148
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1149
|
-
# applications
|
1150
|
-
#
|
1151
|
-
#
|
1152
|
-
#
|
1153
|
-
#
|
1154
|
-
# protocolor.
|
1155
|
-
#
|
1156
|
-
#
|
1157
|
-
# float
|
1158
|
-
# float
|
1159
|
-
#
|
1160
|
-
#
|
1161
|
-
#
|
1162
|
-
#
|
1163
|
-
#
|
1164
|
-
#
|
1165
|
-
#
|
1166
|
-
#
|
1167
|
-
#
|
1168
|
-
#
|
1169
|
-
#
|
1170
|
-
#
|
1171
|
-
#
|
1172
|
-
#
|
1173
|
-
#
|
1149
|
+
# applications should assume the sRGB color space. When color equality needs to
|
1150
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
1151
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
1152
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
1153
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1154
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1155
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
1156
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1157
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1158
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1159
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1160
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1161
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1162
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1163
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1164
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1165
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1166
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1167
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1168
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1169
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1170
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1171
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1172
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1173
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1174
1174
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1175
1175
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1176
1176
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1177
|
-
#
|
1177
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1178
1178
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1179
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1180
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1181
|
-
#
|
1182
|
-
#
|
1183
|
-
#
|
1184
|
-
#
|
1179
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1180
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1181
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1182
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1183
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1184
|
+
# / ...
|
1185
1185
|
# Corresponds to the JSON property `color`
|
1186
1186
|
# @return [Google::Apis::SheetsV4::Color]
|
1187
1187
|
attr_accessor :color
|
@@ -1413,49 +1413,49 @@ module Google
|
|
1413
1413
|
|
1414
1414
|
# Represents a color in the RGBA color space. This representation is designed
|
1415
1415
|
# for simplicity of conversion to/from color representations in various
|
1416
|
-
# languages over compactness
|
1417
|
-
# be trivially provided to the constructor of
|
1418
|
-
# also be trivially provided to UIColor's
|
1416
|
+
# languages over compactness. For example, the fields of this representation can
|
1417
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
1418
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
1419
1419
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
1420
|
-
# CSS
|
1420
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
1421
1421
|
# information about the absolute color space that should be used to interpret
|
1422
1422
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
1423
|
-
# applications
|
1424
|
-
#
|
1425
|
-
#
|
1426
|
-
#
|
1427
|
-
#
|
1428
|
-
# protocolor.
|
1429
|
-
#
|
1430
|
-
#
|
1431
|
-
# float
|
1432
|
-
# float
|
1433
|
-
#
|
1434
|
-
#
|
1435
|
-
#
|
1436
|
-
#
|
1437
|
-
#
|
1438
|
-
#
|
1439
|
-
#
|
1440
|
-
#
|
1441
|
-
#
|
1442
|
-
#
|
1443
|
-
#
|
1444
|
-
#
|
1445
|
-
#
|
1446
|
-
#
|
1447
|
-
#
|
1423
|
+
# applications should assume the sRGB color space. When color equality needs to
|
1424
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
1425
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
1426
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
1427
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
1428
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
1429
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
1430
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
1431
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
1432
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
1433
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
1434
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
1435
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
1436
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
1437
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
1438
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
1439
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
1440
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
1441
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
1442
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
1443
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
1444
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
1445
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
1446
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
1447
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
1448
1448
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
1449
1449
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
1450
1450
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
1451
|
-
#
|
1451
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
1452
1452
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
1453
|
-
# ', alphaFrac, ')'].join(''); `; var
|
1454
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
1455
|
-
#
|
1456
|
-
#
|
1457
|
-
#
|
1458
|
-
#
|
1453
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
1454
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
1455
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
1456
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
1457
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
1458
|
+
# / ...
|
1459
1459
|
# Corresponds to the JSON property `color`
|
1460
1460
|
# @return [Google::Apis::SheetsV4::Color]
|
1461
1461
|
attr_accessor :color
|
@@ -2105,49 +2105,49 @@ module Google
|
|
2105
2105
|
|
2106
2106
|
# Represents a color in the RGBA color space. This representation is designed
|
2107
2107
|
# for simplicity of conversion to/from color representations in various
|
2108
|
-
# languages over compactness
|
2109
|
-
# be trivially provided to the constructor of
|
2110
|
-
# also be trivially provided to UIColor's
|
2108
|
+
# languages over compactness. For example, the fields of this representation can
|
2109
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2110
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2111
2111
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2112
|
-
# CSS
|
2112
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2113
2113
|
# information about the absolute color space that should be used to interpret
|
2114
2114
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
2115
|
-
# applications
|
2116
|
-
#
|
2117
|
-
#
|
2118
|
-
#
|
2119
|
-
#
|
2120
|
-
# protocolor.
|
2121
|
-
#
|
2122
|
-
#
|
2123
|
-
# float
|
2124
|
-
# float
|
2125
|
-
#
|
2126
|
-
#
|
2127
|
-
#
|
2128
|
-
#
|
2129
|
-
#
|
2130
|
-
#
|
2131
|
-
#
|
2132
|
-
#
|
2133
|
-
#
|
2134
|
-
#
|
2135
|
-
#
|
2136
|
-
#
|
2137
|
-
#
|
2138
|
-
#
|
2139
|
-
#
|
2115
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2116
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2117
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2118
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2119
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2120
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2121
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2122
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2123
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2124
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2125
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2126
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2127
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2128
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2129
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2130
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2131
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2132
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2133
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2134
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2135
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2136
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2137
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2138
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2139
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2140
2140
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2141
2141
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2142
2142
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2143
|
-
#
|
2143
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2144
2144
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
2145
|
-
# ', alphaFrac, ')'].join(''); `; var
|
2146
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
2147
|
-
#
|
2148
|
-
#
|
2149
|
-
#
|
2150
|
-
#
|
2145
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2146
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2147
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2148
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2149
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2150
|
+
# / ...
|
2151
2151
|
# Corresponds to the JSON property `color`
|
2152
2152
|
# @return [Google::Apis::SheetsV4::Color]
|
2153
2153
|
attr_accessor :color
|
@@ -2224,49 +2224,49 @@ module Google
|
|
2224
2224
|
|
2225
2225
|
# Represents a color in the RGBA color space. This representation is designed
|
2226
2226
|
# for simplicity of conversion to/from color representations in various
|
2227
|
-
# languages over compactness
|
2228
|
-
# be trivially provided to the constructor of
|
2229
|
-
# also be trivially provided to UIColor's
|
2227
|
+
# languages over compactness. For example, the fields of this representation can
|
2228
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2229
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2230
2230
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2231
|
-
# CSS
|
2231
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2232
2232
|
# information about the absolute color space that should be used to interpret
|
2233
2233
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
2234
|
-
# applications
|
2235
|
-
#
|
2236
|
-
#
|
2237
|
-
#
|
2238
|
-
#
|
2239
|
-
# protocolor.
|
2240
|
-
#
|
2241
|
-
#
|
2242
|
-
# float
|
2243
|
-
# float
|
2244
|
-
#
|
2245
|
-
#
|
2246
|
-
#
|
2247
|
-
#
|
2248
|
-
#
|
2249
|
-
#
|
2250
|
-
#
|
2251
|
-
#
|
2252
|
-
#
|
2253
|
-
#
|
2254
|
-
#
|
2255
|
-
#
|
2256
|
-
#
|
2257
|
-
#
|
2258
|
-
#
|
2234
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2235
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2236
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2237
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2238
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2239
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2240
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2241
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2242
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2243
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2244
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2245
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2246
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2247
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2248
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2249
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2250
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2251
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2252
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2253
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2254
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2255
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2256
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2257
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2258
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2259
2259
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2260
2260
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2261
2261
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2262
|
-
#
|
2262
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2263
2263
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
2264
|
-
# ', alphaFrac, ')'].join(''); `; var
|
2265
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
2266
|
-
#
|
2267
|
-
#
|
2268
|
-
#
|
2269
|
-
#
|
2264
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2265
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2266
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2267
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2268
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2269
|
+
# / ...
|
2270
2270
|
# Corresponds to the JSON property `bubbleBorderColor`
|
2271
2271
|
# @return [Google::Apis::SheetsV4::Color]
|
2272
2272
|
attr_accessor :bubble_border_color
|
@@ -2560,49 +2560,49 @@ module Google
|
|
2560
2560
|
|
2561
2561
|
# Represents a color in the RGBA color space. This representation is designed
|
2562
2562
|
# for simplicity of conversion to/from color representations in various
|
2563
|
-
# languages over compactness
|
2564
|
-
# be trivially provided to the constructor of
|
2565
|
-
# also be trivially provided to UIColor's
|
2563
|
+
# languages over compactness. For example, the fields of this representation can
|
2564
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2565
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2566
2566
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2567
|
-
# CSS
|
2567
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2568
2568
|
# information about the absolute color space that should be used to interpret
|
2569
2569
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
2570
|
-
# applications
|
2571
|
-
#
|
2572
|
-
#
|
2573
|
-
#
|
2574
|
-
#
|
2575
|
-
# protocolor.
|
2576
|
-
#
|
2577
|
-
#
|
2578
|
-
# float
|
2579
|
-
# float
|
2580
|
-
#
|
2581
|
-
#
|
2582
|
-
#
|
2583
|
-
#
|
2584
|
-
#
|
2585
|
-
#
|
2586
|
-
#
|
2587
|
-
#
|
2588
|
-
#
|
2589
|
-
#
|
2590
|
-
#
|
2591
|
-
#
|
2592
|
-
#
|
2593
|
-
#
|
2594
|
-
#
|
2570
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2571
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2572
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2573
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2574
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2575
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2576
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2577
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2578
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2579
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2580
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2581
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2582
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2583
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2584
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2585
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2586
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2587
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2588
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2589
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2590
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2591
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2592
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2593
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2594
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2595
2595
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2596
2596
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2597
2597
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2598
|
-
#
|
2598
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2599
2599
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
2600
|
-
# ', alphaFrac, ')'].join(''); `; var
|
2601
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
2602
|
-
#
|
2603
|
-
#
|
2604
|
-
#
|
2605
|
-
#
|
2600
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2601
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2602
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2603
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2604
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2605
|
+
# / ...
|
2606
2606
|
# Corresponds to the JSON property `backgroundColor`
|
2607
2607
|
# @return [Google::Apis::SheetsV4::Color]
|
2608
2608
|
attr_accessor :background_color
|
@@ -2913,49 +2913,49 @@ module Google
|
|
2913
2913
|
|
2914
2914
|
# Represents a color in the RGBA color space. This representation is designed
|
2915
2915
|
# for simplicity of conversion to/from color representations in various
|
2916
|
-
# languages over compactness
|
2917
|
-
# be trivially provided to the constructor of
|
2918
|
-
# also be trivially provided to UIColor's
|
2916
|
+
# languages over compactness. For example, the fields of this representation can
|
2917
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2918
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2919
2919
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2920
|
-
# CSS
|
2920
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2921
2921
|
# information about the absolute color space that should be used to interpret
|
2922
2922
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
2923
|
-
# applications
|
2924
|
-
#
|
2925
|
-
#
|
2926
|
-
#
|
2927
|
-
#
|
2928
|
-
# protocolor.
|
2929
|
-
#
|
2930
|
-
#
|
2931
|
-
# float
|
2932
|
-
# float
|
2933
|
-
#
|
2934
|
-
#
|
2935
|
-
#
|
2936
|
-
#
|
2937
|
-
#
|
2938
|
-
#
|
2939
|
-
#
|
2940
|
-
#
|
2941
|
-
#
|
2942
|
-
#
|
2943
|
-
#
|
2944
|
-
#
|
2945
|
-
#
|
2946
|
-
#
|
2947
|
-
#
|
2923
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2924
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2925
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2926
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2927
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2928
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2929
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2930
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2931
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2932
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2933
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2934
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2935
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2936
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2937
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2938
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2939
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2940
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2941
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2942
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2943
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2944
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2945
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2946
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2947
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2948
2948
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2949
2949
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2950
2950
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2951
|
-
#
|
2951
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2952
2952
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
2953
|
-
# ', alphaFrac, ')'].join(''); `; var
|
2954
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
2955
|
-
#
|
2956
|
-
#
|
2957
|
-
#
|
2958
|
-
#
|
2953
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2954
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2955
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2956
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2957
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2958
|
+
# / ...
|
2959
2959
|
# Corresponds to the JSON property `backgroundColor`
|
2960
2960
|
# @return [Google::Apis::SheetsV4::Color]
|
2961
2961
|
attr_accessor :background_color
|
@@ -3189,61 +3189,60 @@ module Google
|
|
3189
3189
|
|
3190
3190
|
# Represents a color in the RGBA color space. This representation is designed
|
3191
3191
|
# for simplicity of conversion to/from color representations in various
|
3192
|
-
# languages over compactness
|
3193
|
-
# be trivially provided to the constructor of
|
3194
|
-
# also be trivially provided to UIColor's
|
3192
|
+
# languages over compactness. For example, the fields of this representation can
|
3193
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3194
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3195
3195
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3196
|
-
# CSS
|
3196
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3197
3197
|
# information about the absolute color space that should be used to interpret
|
3198
3198
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3199
|
-
# applications
|
3200
|
-
#
|
3201
|
-
#
|
3202
|
-
#
|
3203
|
-
#
|
3204
|
-
# protocolor.
|
3205
|
-
#
|
3206
|
-
#
|
3207
|
-
# float
|
3208
|
-
# float
|
3209
|
-
#
|
3210
|
-
#
|
3211
|
-
#
|
3212
|
-
#
|
3213
|
-
#
|
3214
|
-
#
|
3215
|
-
#
|
3216
|
-
#
|
3217
|
-
#
|
3218
|
-
#
|
3219
|
-
#
|
3220
|
-
#
|
3221
|
-
#
|
3222
|
-
#
|
3223
|
-
#
|
3199
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3200
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3201
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3202
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3203
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3204
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3205
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3206
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3207
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3208
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3209
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3210
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3211
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3212
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3213
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3214
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3215
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3216
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3217
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3218
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3219
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3220
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3221
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3222
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3223
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3224
3224
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3225
3225
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3226
3226
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3227
|
-
#
|
3227
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3228
3228
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3229
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3230
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3231
|
-
#
|
3232
|
-
#
|
3233
|
-
#
|
3234
|
-
#
|
3229
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3230
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3231
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3232
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3233
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3234
|
+
# / ...
|
3235
3235
|
class Color
|
3236
3236
|
include Google::Apis::Core::Hashable
|
3237
3237
|
|
3238
3238
|
# The fraction of this color that should be applied to the pixel. That is, the
|
3239
|
-
# final pixel color is defined by the equation: pixel color = alpha * (this
|
3240
|
-
# color) + (1.0 - alpha) * (background color) This means that a value of 1.0
|
3239
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
3240
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
3241
3241
|
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
3242
3242
|
# completely transparent color. This uses a wrapper message rather than a simple
|
3243
3243
|
# float scalar so that it is possible to distinguish between a default value and
|
3244
|
-
# the value being unset. If omitted, this color object is
|
3245
|
-
#
|
3246
|
-
# 0).
|
3244
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
3245
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
3247
3246
|
# Corresponds to the JSON property `alpha`
|
3248
3247
|
# @return [Float]
|
3249
3248
|
attr_accessor :alpha
|
@@ -3282,49 +3281,49 @@ module Google
|
|
3282
3281
|
|
3283
3282
|
# Represents a color in the RGBA color space. This representation is designed
|
3284
3283
|
# for simplicity of conversion to/from color representations in various
|
3285
|
-
# languages over compactness
|
3286
|
-
# be trivially provided to the constructor of
|
3287
|
-
# also be trivially provided to UIColor's
|
3284
|
+
# languages over compactness. For example, the fields of this representation can
|
3285
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3286
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3288
3287
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3289
|
-
# CSS
|
3288
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3290
3289
|
# information about the absolute color space that should be used to interpret
|
3291
3290
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
3292
|
-
# applications
|
3293
|
-
#
|
3294
|
-
#
|
3295
|
-
#
|
3296
|
-
#
|
3297
|
-
# protocolor.
|
3298
|
-
#
|
3299
|
-
#
|
3300
|
-
# float
|
3301
|
-
# float
|
3302
|
-
#
|
3303
|
-
#
|
3304
|
-
#
|
3305
|
-
#
|
3306
|
-
#
|
3307
|
-
#
|
3308
|
-
#
|
3309
|
-
#
|
3310
|
-
#
|
3311
|
-
#
|
3312
|
-
#
|
3313
|
-
#
|
3314
|
-
#
|
3315
|
-
#
|
3316
|
-
#
|
3291
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3292
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3293
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3294
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3295
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3296
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3297
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3298
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3299
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3300
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3301
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3302
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3303
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3304
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3305
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3306
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3307
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3308
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3309
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3310
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3311
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3312
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3313
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3314
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3315
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3317
3316
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3318
3317
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3319
3318
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3320
|
-
#
|
3319
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3321
3320
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
3322
|
-
# ', alphaFrac, ')'].join(''); `; var
|
3323
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
3324
|
-
#
|
3325
|
-
#
|
3326
|
-
#
|
3327
|
-
#
|
3321
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3322
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3323
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3324
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3325
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3326
|
+
# / ...
|
3328
3327
|
# Corresponds to the JSON property `rgbColor`
|
3329
3328
|
# @return [Google::Apis::SheetsV4::Color]
|
3330
3329
|
attr_accessor :rgb_color
|
@@ -5241,49 +5240,49 @@ module Google
|
|
5241
5240
|
|
5242
5241
|
# Represents a color in the RGBA color space. This representation is designed
|
5243
5242
|
# for simplicity of conversion to/from color representations in various
|
5244
|
-
# languages over compactness
|
5245
|
-
# be trivially provided to the constructor of
|
5246
|
-
# also be trivially provided to UIColor's
|
5243
|
+
# languages over compactness. For example, the fields of this representation can
|
5244
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5245
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5247
5246
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5248
|
-
# CSS
|
5247
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5249
5248
|
# information about the absolute color space that should be used to interpret
|
5250
5249
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
5251
|
-
# applications
|
5252
|
-
#
|
5253
|
-
#
|
5254
|
-
#
|
5255
|
-
#
|
5256
|
-
# protocolor.
|
5257
|
-
#
|
5258
|
-
#
|
5259
|
-
# float
|
5260
|
-
# float
|
5261
|
-
#
|
5262
|
-
#
|
5263
|
-
#
|
5264
|
-
#
|
5265
|
-
#
|
5266
|
-
#
|
5267
|
-
#
|
5268
|
-
#
|
5269
|
-
#
|
5270
|
-
#
|
5271
|
-
#
|
5272
|
-
#
|
5273
|
-
#
|
5274
|
-
#
|
5275
|
-
#
|
5250
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5251
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5252
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5253
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5254
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5255
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5256
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5257
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5258
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5259
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5260
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5261
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5262
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5263
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5264
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5265
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5266
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5267
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5268
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5269
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5270
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5271
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5272
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5273
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5274
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5276
5275
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5277
5276
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5278
5277
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5279
|
-
#
|
5278
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5280
5279
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5281
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5282
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5283
|
-
#
|
5284
|
-
#
|
5285
|
-
#
|
5286
|
-
#
|
5280
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5281
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5282
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5283
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5284
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5285
|
+
# / ...
|
5287
5286
|
# Corresponds to the JSON property `color`
|
5288
5287
|
# @return [Google::Apis::SheetsV4::Color]
|
5289
5288
|
attr_accessor :color
|
@@ -5427,49 +5426,49 @@ module Google
|
|
5427
5426
|
|
5428
5427
|
# Represents a color in the RGBA color space. This representation is designed
|
5429
5428
|
# for simplicity of conversion to/from color representations in various
|
5430
|
-
# languages over compactness
|
5431
|
-
# be trivially provided to the constructor of
|
5432
|
-
# also be trivially provided to UIColor's
|
5429
|
+
# languages over compactness. For example, the fields of this representation can
|
5430
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5431
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5433
5432
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5434
|
-
# CSS
|
5433
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5435
5434
|
# information about the absolute color space that should be used to interpret
|
5436
5435
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
5437
|
-
# applications
|
5438
|
-
#
|
5439
|
-
#
|
5440
|
-
#
|
5441
|
-
#
|
5442
|
-
# protocolor.
|
5443
|
-
#
|
5444
|
-
#
|
5445
|
-
# float
|
5446
|
-
# float
|
5447
|
-
#
|
5448
|
-
#
|
5449
|
-
#
|
5450
|
-
#
|
5451
|
-
#
|
5452
|
-
#
|
5453
|
-
#
|
5454
|
-
#
|
5455
|
-
#
|
5456
|
-
#
|
5457
|
-
#
|
5458
|
-
#
|
5459
|
-
#
|
5460
|
-
#
|
5461
|
-
#
|
5436
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5437
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5438
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5439
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5440
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5441
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5442
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5443
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5444
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5445
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5446
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5447
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5448
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5449
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5450
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5451
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5452
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5453
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5454
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5455
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5456
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5457
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5458
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5459
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5460
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5462
5461
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5463
5462
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5464
5463
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5465
|
-
#
|
5464
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5466
5465
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5467
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5468
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5469
|
-
#
|
5470
|
-
#
|
5471
|
-
#
|
5472
|
-
#
|
5466
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5467
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5468
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5469
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5470
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5471
|
+
# / ...
|
5473
5472
|
# Corresponds to the JSON property `visibleBackgroundColor`
|
5474
5473
|
# @return [Google::Apis::SheetsV4::Color]
|
5475
5474
|
attr_accessor :visible_background_color
|
@@ -5481,49 +5480,49 @@ module Google
|
|
5481
5480
|
|
5482
5481
|
# Represents a color in the RGBA color space. This representation is designed
|
5483
5482
|
# for simplicity of conversion to/from color representations in various
|
5484
|
-
# languages over compactness
|
5485
|
-
# be trivially provided to the constructor of
|
5486
|
-
# also be trivially provided to UIColor's
|
5483
|
+
# languages over compactness. For example, the fields of this representation can
|
5484
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5485
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5487
5486
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5488
|
-
# CSS
|
5487
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5489
5488
|
# information about the absolute color space that should be used to interpret
|
5490
5489
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
5491
|
-
# applications
|
5492
|
-
#
|
5493
|
-
#
|
5494
|
-
#
|
5495
|
-
#
|
5496
|
-
# protocolor.
|
5497
|
-
#
|
5498
|
-
#
|
5499
|
-
# float
|
5500
|
-
# float
|
5501
|
-
#
|
5502
|
-
#
|
5503
|
-
#
|
5504
|
-
#
|
5505
|
-
#
|
5506
|
-
#
|
5507
|
-
#
|
5508
|
-
#
|
5509
|
-
#
|
5510
|
-
#
|
5511
|
-
#
|
5512
|
-
#
|
5513
|
-
#
|
5514
|
-
#
|
5515
|
-
#
|
5490
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5491
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5492
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5493
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5494
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5495
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5496
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5497
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5498
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5499
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5500
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5501
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5502
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5503
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5504
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5505
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5506
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5507
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5508
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5509
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5510
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5511
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5512
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5513
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5514
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5516
5515
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5517
5516
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5518
5517
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5519
|
-
#
|
5518
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5520
5519
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
5521
|
-
# ', alphaFrac, ')'].join(''); `; var
|
5522
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
5523
|
-
#
|
5524
|
-
#
|
5525
|
-
#
|
5526
|
-
#
|
5520
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5521
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5522
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5523
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5524
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5525
|
+
# / ...
|
5527
5526
|
# Corresponds to the JSON property `visibleForegroundColor`
|
5528
5527
|
# @return [Google::Apis::SheetsV4::Color]
|
5529
5528
|
attr_accessor :visible_foreground_color
|
@@ -6154,49 +6153,49 @@ module Google
|
|
6154
6153
|
|
6155
6154
|
# Represents a color in the RGBA color space. This representation is designed
|
6156
6155
|
# for simplicity of conversion to/from color representations in various
|
6157
|
-
# languages over compactness
|
6158
|
-
# be trivially provided to the constructor of
|
6159
|
-
# also be trivially provided to UIColor's
|
6156
|
+
# languages over compactness. For example, the fields of this representation can
|
6157
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6158
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6160
6159
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6161
|
-
# CSS
|
6160
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6162
6161
|
# information about the absolute color space that should be used to interpret
|
6163
6162
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6164
|
-
# applications
|
6165
|
-
#
|
6166
|
-
#
|
6167
|
-
#
|
6168
|
-
#
|
6169
|
-
# protocolor.
|
6170
|
-
#
|
6171
|
-
#
|
6172
|
-
# float
|
6173
|
-
# float
|
6174
|
-
#
|
6175
|
-
#
|
6176
|
-
#
|
6177
|
-
#
|
6178
|
-
#
|
6179
|
-
#
|
6180
|
-
#
|
6181
|
-
#
|
6182
|
-
#
|
6183
|
-
#
|
6184
|
-
#
|
6185
|
-
#
|
6186
|
-
#
|
6187
|
-
#
|
6188
|
-
#
|
6163
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6164
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6165
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6166
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6167
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6168
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6169
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6170
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6171
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6172
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6173
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6174
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6175
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6176
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6177
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6178
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6179
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6180
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6181
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6182
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6183
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6184
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6185
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6186
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6187
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6189
6188
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6190
6189
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6191
6190
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6192
|
-
#
|
6191
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6193
6192
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6194
|
-
# ', alphaFrac, ')'].join(''); `; var
|
6195
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
6196
|
-
#
|
6197
|
-
#
|
6198
|
-
#
|
6199
|
-
#
|
6193
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6194
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6195
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6196
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6197
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6198
|
+
# / ...
|
6200
6199
|
# Corresponds to the JSON property `barColor`
|
6201
6200
|
# @return [Google::Apis::SheetsV4::Color]
|
6202
6201
|
attr_accessor :bar_color
|
@@ -6304,49 +6303,49 @@ module Google
|
|
6304
6303
|
|
6305
6304
|
# Represents a color in the RGBA color space. This representation is designed
|
6306
6305
|
# for simplicity of conversion to/from color representations in various
|
6307
|
-
# languages over compactness
|
6308
|
-
# be trivially provided to the constructor of
|
6309
|
-
# also be trivially provided to UIColor's
|
6306
|
+
# languages over compactness. For example, the fields of this representation can
|
6307
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6308
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6310
6309
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6311
|
-
# CSS
|
6310
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6312
6311
|
# information about the absolute color space that should be used to interpret
|
6313
6312
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6314
|
-
# applications
|
6315
|
-
#
|
6316
|
-
#
|
6317
|
-
#
|
6318
|
-
#
|
6319
|
-
# protocolor.
|
6320
|
-
#
|
6321
|
-
#
|
6322
|
-
# float
|
6323
|
-
# float
|
6324
|
-
#
|
6325
|
-
#
|
6326
|
-
#
|
6327
|
-
#
|
6328
|
-
#
|
6329
|
-
#
|
6330
|
-
#
|
6331
|
-
#
|
6332
|
-
#
|
6333
|
-
#
|
6334
|
-
#
|
6335
|
-
#
|
6336
|
-
#
|
6337
|
-
#
|
6338
|
-
#
|
6313
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6314
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6315
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6316
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6317
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6318
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6319
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6320
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6321
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6322
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6323
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6324
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6325
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6326
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6327
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6328
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6329
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6330
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6331
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6332
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6333
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6334
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6335
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6336
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6337
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6339
6338
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6340
6339
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6341
6340
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6342
|
-
#
|
6341
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6343
6342
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6344
|
-
# ', alphaFrac, ')'].join(''); `; var
|
6345
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
6346
|
-
#
|
6347
|
-
#
|
6348
|
-
#
|
6349
|
-
#
|
6343
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6344
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6345
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6346
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6347
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6348
|
+
# / ...
|
6350
6349
|
# Corresponds to the JSON property `color`
|
6351
6350
|
# @return [Google::Apis::SheetsV4::Color]
|
6352
6351
|
attr_accessor :color
|
@@ -6768,49 +6767,49 @@ module Google
|
|
6768
6767
|
|
6769
6768
|
# Represents a color in the RGBA color space. This representation is designed
|
6770
6769
|
# for simplicity of conversion to/from color representations in various
|
6771
|
-
# languages over compactness
|
6772
|
-
# be trivially provided to the constructor of
|
6773
|
-
# also be trivially provided to UIColor's
|
6770
|
+
# languages over compactness. For example, the fields of this representation can
|
6771
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6772
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6774
6773
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6775
|
-
# CSS
|
6774
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6776
6775
|
# information about the absolute color space that should be used to interpret
|
6777
6776
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6778
|
-
# applications
|
6779
|
-
#
|
6780
|
-
#
|
6781
|
-
#
|
6782
|
-
#
|
6783
|
-
# protocolor.
|
6784
|
-
#
|
6785
|
-
#
|
6786
|
-
# float
|
6787
|
-
# float
|
6788
|
-
#
|
6789
|
-
#
|
6790
|
-
#
|
6791
|
-
#
|
6792
|
-
#
|
6793
|
-
#
|
6794
|
-
#
|
6795
|
-
#
|
6796
|
-
#
|
6797
|
-
#
|
6798
|
-
#
|
6799
|
-
#
|
6800
|
-
#
|
6801
|
-
#
|
6802
|
-
#
|
6777
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6778
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6779
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6780
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6781
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6782
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6783
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6784
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6785
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6786
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6787
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6788
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6789
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6790
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6791
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6792
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6793
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6794
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6795
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6796
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6797
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6798
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6799
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6800
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6801
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6803
6802
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6804
6803
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6805
6804
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6806
|
-
#
|
6805
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6807
6806
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6808
|
-
# ', alphaFrac, ')'].join(''); `; var
|
6809
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
6810
|
-
#
|
6811
|
-
#
|
6812
|
-
#
|
6813
|
-
#
|
6807
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6808
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6809
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6810
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6811
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6812
|
+
# / ...
|
6814
6813
|
# Corresponds to the JSON property `nodeColor`
|
6815
6814
|
# @return [Google::Apis::SheetsV4::Color]
|
6816
6815
|
attr_accessor :node_color
|
@@ -6832,49 +6831,49 @@ module Google
|
|
6832
6831
|
|
6833
6832
|
# Represents a color in the RGBA color space. This representation is designed
|
6834
6833
|
# for simplicity of conversion to/from color representations in various
|
6835
|
-
# languages over compactness
|
6836
|
-
# be trivially provided to the constructor of
|
6837
|
-
# also be trivially provided to UIColor's
|
6834
|
+
# languages over compactness. For example, the fields of this representation can
|
6835
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6836
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6838
6837
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6839
|
-
# CSS
|
6838
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6840
6839
|
# information about the absolute color space that should be used to interpret
|
6841
6840
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
6842
|
-
# applications
|
6843
|
-
#
|
6844
|
-
#
|
6845
|
-
#
|
6846
|
-
#
|
6847
|
-
# protocolor.
|
6848
|
-
#
|
6849
|
-
#
|
6850
|
-
# float
|
6851
|
-
# float
|
6852
|
-
#
|
6853
|
-
#
|
6854
|
-
#
|
6855
|
-
#
|
6856
|
-
#
|
6857
|
-
#
|
6858
|
-
#
|
6859
|
-
#
|
6860
|
-
#
|
6861
|
-
#
|
6862
|
-
#
|
6863
|
-
#
|
6864
|
-
#
|
6865
|
-
#
|
6866
|
-
#
|
6841
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6842
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6843
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6844
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6845
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6846
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6847
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6848
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6849
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6850
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6851
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6852
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6853
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6854
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6855
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6856
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6857
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6858
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6859
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6860
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6861
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6862
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6863
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6864
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6865
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6867
6866
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6868
6867
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6869
6868
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6870
|
-
#
|
6869
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6871
6870
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
6872
|
-
# ', alphaFrac, ')'].join(''); `; var
|
6873
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
6874
|
-
#
|
6875
|
-
#
|
6876
|
-
#
|
6877
|
-
#
|
6871
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6872
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6873
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6874
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6875
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6876
|
+
# / ...
|
6878
6877
|
# Corresponds to the JSON property `selectedNodeColor`
|
6879
6878
|
# @return [Google::Apis::SheetsV4::Color]
|
6880
6879
|
attr_accessor :selected_node_color
|
@@ -8802,49 +8801,49 @@ module Google
|
|
8802
8801
|
|
8803
8802
|
# Represents a color in the RGBA color space. This representation is designed
|
8804
8803
|
# for simplicity of conversion to/from color representations in various
|
8805
|
-
# languages over compactness
|
8806
|
-
# be trivially provided to the constructor of
|
8807
|
-
# also be trivially provided to UIColor's
|
8804
|
+
# languages over compactness. For example, the fields of this representation can
|
8805
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8806
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8808
8807
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8809
|
-
# CSS
|
8808
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8810
8809
|
# information about the absolute color space that should be used to interpret
|
8811
8810
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
8812
|
-
# applications
|
8813
|
-
#
|
8814
|
-
#
|
8815
|
-
#
|
8816
|
-
#
|
8817
|
-
# protocolor.
|
8818
|
-
#
|
8819
|
-
#
|
8820
|
-
# float
|
8821
|
-
# float
|
8822
|
-
#
|
8823
|
-
#
|
8824
|
-
#
|
8825
|
-
#
|
8826
|
-
#
|
8827
|
-
#
|
8828
|
-
#
|
8829
|
-
#
|
8830
|
-
#
|
8831
|
-
#
|
8832
|
-
#
|
8833
|
-
#
|
8834
|
-
#
|
8835
|
-
#
|
8836
|
-
#
|
8811
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8812
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8813
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8814
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8815
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8816
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8817
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8818
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8819
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8820
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8821
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8822
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8823
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8824
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8825
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8826
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8827
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8828
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8829
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8830
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8831
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8832
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8833
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8834
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8835
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8837
8836
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8838
8837
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8839
8838
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8840
|
-
#
|
8839
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8841
8840
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
8842
|
-
# ', alphaFrac, ')'].join(''); `; var
|
8843
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
8844
|
-
#
|
8845
|
-
#
|
8846
|
-
#
|
8847
|
-
#
|
8841
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8842
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8843
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8844
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8845
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8846
|
+
# / ...
|
8848
8847
|
# Corresponds to the JSON property `tabColor`
|
8849
8848
|
# @return [Google::Apis::SheetsV4::Color]
|
8850
8849
|
attr_accessor :tab_color
|
@@ -8921,49 +8920,49 @@ module Google
|
|
8921
8920
|
|
8922
8921
|
# Represents a color in the RGBA color space. This representation is designed
|
8923
8922
|
# for simplicity of conversion to/from color representations in various
|
8924
|
-
# languages over compactness
|
8925
|
-
# be trivially provided to the constructor of
|
8926
|
-
# also be trivially provided to UIColor's
|
8923
|
+
# languages over compactness. For example, the fields of this representation can
|
8924
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8925
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8927
8926
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8928
|
-
# CSS
|
8927
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8929
8928
|
# information about the absolute color space that should be used to interpret
|
8930
8929
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
8931
|
-
# applications
|
8932
|
-
#
|
8933
|
-
#
|
8934
|
-
#
|
8935
|
-
#
|
8936
|
-
# protocolor.
|
8937
|
-
#
|
8938
|
-
#
|
8939
|
-
# float
|
8940
|
-
# float
|
8941
|
-
#
|
8942
|
-
#
|
8943
|
-
#
|
8944
|
-
#
|
8945
|
-
#
|
8946
|
-
#
|
8947
|
-
#
|
8948
|
-
#
|
8949
|
-
#
|
8950
|
-
#
|
8951
|
-
#
|
8952
|
-
#
|
8953
|
-
#
|
8954
|
-
#
|
8955
|
-
#
|
8930
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8931
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8932
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8933
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8934
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8935
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8936
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8937
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8938
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8939
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8940
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8941
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8942
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8943
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8944
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8945
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8946
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8947
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8948
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8949
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8950
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8951
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8952
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8953
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8954
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8956
8955
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8957
8956
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8958
8957
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8959
|
-
#
|
8958
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8960
8959
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
8961
|
-
# ', alphaFrac, ')'].join(''); `; var
|
8962
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
8963
|
-
#
|
8964
|
-
#
|
8965
|
-
#
|
8966
|
-
#
|
8960
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8961
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8962
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8963
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8964
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8965
|
+
# / ...
|
8967
8966
|
# Corresponds to the JSON property `backgroundColor`
|
8968
8967
|
# @return [Google::Apis::SheetsV4::Color]
|
8969
8968
|
attr_accessor :background_color
|
@@ -9079,49 +9078,49 @@ module Google
|
|
9079
9078
|
|
9080
9079
|
# Represents a color in the RGBA color space. This representation is designed
|
9081
9080
|
# for simplicity of conversion to/from color representations in various
|
9082
|
-
# languages over compactness
|
9083
|
-
# be trivially provided to the constructor of
|
9084
|
-
# also be trivially provided to UIColor's
|
9081
|
+
# languages over compactness. For example, the fields of this representation can
|
9082
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9083
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9085
9084
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9086
|
-
# CSS
|
9085
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9087
9086
|
# information about the absolute color space that should be used to interpret
|
9088
9087
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9089
|
-
# applications
|
9090
|
-
#
|
9091
|
-
#
|
9092
|
-
#
|
9093
|
-
#
|
9094
|
-
# protocolor.
|
9095
|
-
#
|
9096
|
-
#
|
9097
|
-
# float
|
9098
|
-
# float
|
9099
|
-
#
|
9100
|
-
#
|
9101
|
-
#
|
9102
|
-
#
|
9103
|
-
#
|
9104
|
-
#
|
9105
|
-
#
|
9106
|
-
#
|
9107
|
-
#
|
9108
|
-
#
|
9109
|
-
#
|
9110
|
-
#
|
9111
|
-
#
|
9112
|
-
#
|
9113
|
-
#
|
9088
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9089
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9090
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9091
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9092
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9093
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9094
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9095
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9096
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9097
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9098
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9099
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9100
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9101
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9102
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9103
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9104
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9105
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9106
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9107
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9108
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9109
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9110
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9111
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9112
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9114
9113
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9115
9114
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9116
9115
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9117
|
-
#
|
9116
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9118
9117
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
9119
|
-
# ', alphaFrac, ')'].join(''); `; var
|
9120
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
9121
|
-
#
|
9122
|
-
#
|
9123
|
-
#
|
9124
|
-
#
|
9118
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9119
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9120
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9121
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9122
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9123
|
+
# / ...
|
9125
9124
|
# Corresponds to the JSON property `backgroundColor`
|
9126
9125
|
# @return [Google::Apis::SheetsV4::Color]
|
9127
9126
|
attr_accessor :background_color
|
@@ -9143,49 +9142,49 @@ module Google
|
|
9143
9142
|
|
9144
9143
|
# Represents a color in the RGBA color space. This representation is designed
|
9145
9144
|
# for simplicity of conversion to/from color representations in various
|
9146
|
-
# languages over compactness
|
9147
|
-
# be trivially provided to the constructor of
|
9148
|
-
# also be trivially provided to UIColor's
|
9145
|
+
# languages over compactness. For example, the fields of this representation can
|
9146
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9147
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9149
9148
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9150
|
-
# CSS
|
9149
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9151
9150
|
# information about the absolute color space that should be used to interpret
|
9152
9151
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9153
|
-
# applications
|
9154
|
-
#
|
9155
|
-
#
|
9156
|
-
#
|
9157
|
-
#
|
9158
|
-
# protocolor.
|
9159
|
-
#
|
9160
|
-
#
|
9161
|
-
# float
|
9162
|
-
# float
|
9163
|
-
#
|
9164
|
-
#
|
9165
|
-
#
|
9166
|
-
#
|
9167
|
-
#
|
9168
|
-
#
|
9169
|
-
#
|
9170
|
-
#
|
9171
|
-
#
|
9172
|
-
#
|
9173
|
-
#
|
9174
|
-
#
|
9175
|
-
#
|
9176
|
-
#
|
9177
|
-
#
|
9152
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9153
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9154
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9155
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9156
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9157
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9158
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9159
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9160
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9161
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9162
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9163
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9164
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9165
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9166
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9167
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9168
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9169
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9170
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9171
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9172
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9173
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9174
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9175
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9176
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9178
9177
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9179
9178
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9180
9179
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9181
|
-
#
|
9180
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9182
9181
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
9183
|
-
# ', alphaFrac, ')'].join(''); `; var
|
9184
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
9185
|
-
#
|
9186
|
-
#
|
9187
|
-
#
|
9188
|
-
#
|
9182
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9183
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9184
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9185
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9186
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9187
|
+
# / ...
|
9189
9188
|
# Corresponds to the JSON property `foregroundColor`
|
9190
9189
|
# @return [Google::Apis::SheetsV4::Color]
|
9191
9190
|
attr_accessor :foreground_color
|
@@ -9433,49 +9432,49 @@ module Google
|
|
9433
9432
|
|
9434
9433
|
# Represents a color in the RGBA color space. This representation is designed
|
9435
9434
|
# for simplicity of conversion to/from color representations in various
|
9436
|
-
# languages over compactness
|
9437
|
-
# be trivially provided to the constructor of
|
9438
|
-
# also be trivially provided to UIColor's
|
9435
|
+
# languages over compactness. For example, the fields of this representation can
|
9436
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9437
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9439
9438
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9440
|
-
# CSS
|
9439
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9441
9440
|
# information about the absolute color space that should be used to interpret
|
9442
9441
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9443
|
-
# applications
|
9444
|
-
#
|
9445
|
-
#
|
9446
|
-
#
|
9447
|
-
#
|
9448
|
-
# protocolor.
|
9449
|
-
#
|
9450
|
-
#
|
9451
|
-
# float
|
9452
|
-
# float
|
9453
|
-
#
|
9454
|
-
#
|
9455
|
-
#
|
9456
|
-
#
|
9457
|
-
#
|
9458
|
-
#
|
9459
|
-
#
|
9460
|
-
#
|
9461
|
-
#
|
9462
|
-
#
|
9463
|
-
#
|
9464
|
-
#
|
9465
|
-
#
|
9466
|
-
#
|
9467
|
-
#
|
9442
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9443
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9444
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9445
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9446
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9447
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9448
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9449
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9450
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9451
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9452
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9453
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9454
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9455
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9456
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9457
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9458
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9459
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9460
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9461
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9462
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9463
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9464
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9465
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9466
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9468
9467
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9469
9468
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9470
9469
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9471
|
-
#
|
9470
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9472
9471
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
9473
|
-
# ', alphaFrac, ')'].join(''); `; var
|
9474
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
9475
|
-
#
|
9476
|
-
#
|
9477
|
-
#
|
9478
|
-
#
|
9472
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9473
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9474
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9475
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9476
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9477
|
+
# / ...
|
9479
9478
|
# Corresponds to the JSON property `foregroundColor`
|
9480
9479
|
# @return [Google::Apis::SheetsV4::Color]
|
9481
9480
|
attr_accessor :foreground_color
|
@@ -9715,49 +9714,49 @@ module Google
|
|
9715
9714
|
|
9716
9715
|
# Represents a color in the RGBA color space. This representation is designed
|
9717
9716
|
# for simplicity of conversion to/from color representations in various
|
9718
|
-
# languages over compactness
|
9719
|
-
# be trivially provided to the constructor of
|
9720
|
-
# also be trivially provided to UIColor's
|
9717
|
+
# languages over compactness. For example, the fields of this representation can
|
9718
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9719
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9721
9720
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9722
|
-
# CSS
|
9721
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9723
9722
|
# information about the absolute color space that should be used to interpret
|
9724
9723
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9725
|
-
# applications
|
9726
|
-
#
|
9727
|
-
#
|
9728
|
-
#
|
9729
|
-
#
|
9730
|
-
# protocolor.
|
9731
|
-
#
|
9732
|
-
#
|
9733
|
-
# float
|
9734
|
-
# float
|
9735
|
-
#
|
9736
|
-
#
|
9737
|
-
#
|
9738
|
-
#
|
9739
|
-
#
|
9740
|
-
#
|
9741
|
-
#
|
9742
|
-
#
|
9743
|
-
#
|
9744
|
-
#
|
9745
|
-
#
|
9746
|
-
#
|
9747
|
-
#
|
9748
|
-
#
|
9749
|
-
#
|
9724
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9725
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9726
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9727
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9728
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9729
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9730
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9731
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9732
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9733
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9734
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9735
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9736
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9737
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9738
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9739
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9740
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9741
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9742
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9743
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9744
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9745
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9746
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9747
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9748
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9750
9749
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9751
9750
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9752
9751
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9753
|
-
#
|
9752
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9754
9753
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
9755
|
-
# ', alphaFrac, ')'].join(''); `; var
|
9756
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
9757
|
-
#
|
9758
|
-
#
|
9759
|
-
#
|
9760
|
-
#
|
9754
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9755
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9756
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9757
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9758
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9759
|
+
# / ...
|
9761
9760
|
# Corresponds to the JSON property `maxValueColor`
|
9762
9761
|
# @return [Google::Apis::SheetsV4::Color]
|
9763
9762
|
attr_accessor :max_value_color
|
@@ -9769,49 +9768,49 @@ module Google
|
|
9769
9768
|
|
9770
9769
|
# Represents a color in the RGBA color space. This representation is designed
|
9771
9770
|
# for simplicity of conversion to/from color representations in various
|
9772
|
-
# languages over compactness
|
9773
|
-
# be trivially provided to the constructor of
|
9774
|
-
# also be trivially provided to UIColor's
|
9771
|
+
# languages over compactness. For example, the fields of this representation can
|
9772
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9773
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9775
9774
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9776
|
-
# CSS
|
9775
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9777
9776
|
# information about the absolute color space that should be used to interpret
|
9778
9777
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9779
|
-
# applications
|
9780
|
-
#
|
9781
|
-
#
|
9782
|
-
#
|
9783
|
-
#
|
9784
|
-
# protocolor.
|
9785
|
-
#
|
9786
|
-
#
|
9787
|
-
# float
|
9788
|
-
# float
|
9789
|
-
#
|
9790
|
-
#
|
9791
|
-
#
|
9792
|
-
#
|
9793
|
-
#
|
9794
|
-
#
|
9795
|
-
#
|
9796
|
-
#
|
9797
|
-
#
|
9798
|
-
#
|
9799
|
-
#
|
9800
|
-
#
|
9801
|
-
#
|
9802
|
-
#
|
9803
|
-
#
|
9778
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9779
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9780
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9781
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9782
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9783
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9784
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9785
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9786
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9787
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9788
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9789
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9790
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9791
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9792
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9793
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9794
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9795
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9796
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9797
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9798
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9799
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9800
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9801
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9802
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9804
9803
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9805
9804
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9806
9805
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9807
|
-
#
|
9806
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9808
9807
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
9809
|
-
# ', alphaFrac, ')'].join(''); `; var
|
9810
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
9811
|
-
#
|
9812
|
-
#
|
9813
|
-
#
|
9814
|
-
#
|
9808
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9809
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9810
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9811
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9812
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9813
|
+
# / ...
|
9815
9814
|
# Corresponds to the JSON property `midValueColor`
|
9816
9815
|
# @return [Google::Apis::SheetsV4::Color]
|
9817
9816
|
attr_accessor :mid_value_color
|
@@ -9823,49 +9822,49 @@ module Google
|
|
9823
9822
|
|
9824
9823
|
# Represents a color in the RGBA color space. This representation is designed
|
9825
9824
|
# for simplicity of conversion to/from color representations in various
|
9826
|
-
# languages over compactness
|
9827
|
-
# be trivially provided to the constructor of
|
9828
|
-
# also be trivially provided to UIColor's
|
9825
|
+
# languages over compactness. For example, the fields of this representation can
|
9826
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9827
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9829
9828
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9830
|
-
# CSS
|
9829
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9831
9830
|
# information about the absolute color space that should be used to interpret
|
9832
9831
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9833
|
-
# applications
|
9834
|
-
#
|
9835
|
-
#
|
9836
|
-
#
|
9837
|
-
#
|
9838
|
-
# protocolor.
|
9839
|
-
#
|
9840
|
-
#
|
9841
|
-
# float
|
9842
|
-
# float
|
9843
|
-
#
|
9844
|
-
#
|
9845
|
-
#
|
9846
|
-
#
|
9847
|
-
#
|
9848
|
-
#
|
9849
|
-
#
|
9850
|
-
#
|
9851
|
-
#
|
9852
|
-
#
|
9853
|
-
#
|
9854
|
-
#
|
9855
|
-
#
|
9856
|
-
#
|
9857
|
-
#
|
9832
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9833
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9834
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9835
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9836
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9837
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9838
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9839
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9840
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9841
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9842
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9843
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9844
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9845
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9846
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9847
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9848
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9849
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9850
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9851
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9852
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9853
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9854
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9855
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9856
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9858
9857
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9859
9858
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9860
9859
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9861
|
-
#
|
9860
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9862
9861
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
9863
|
-
# ', alphaFrac, ')'].join(''); `; var
|
9864
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
9865
|
-
#
|
9866
|
-
#
|
9867
|
-
#
|
9868
|
-
#
|
9862
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9863
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9864
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9865
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9866
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9867
|
+
# / ...
|
9869
9868
|
# Corresponds to the JSON property `minValueColor`
|
9870
9869
|
# @return [Google::Apis::SheetsV4::Color]
|
9871
9870
|
attr_accessor :min_value_color
|
@@ -9877,49 +9876,49 @@ module Google
|
|
9877
9876
|
|
9878
9877
|
# Represents a color in the RGBA color space. This representation is designed
|
9879
9878
|
# for simplicity of conversion to/from color representations in various
|
9880
|
-
# languages over compactness
|
9881
|
-
# be trivially provided to the constructor of
|
9882
|
-
# also be trivially provided to UIColor's
|
9879
|
+
# languages over compactness. For example, the fields of this representation can
|
9880
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9881
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9883
9882
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9884
|
-
# CSS
|
9883
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9885
9884
|
# information about the absolute color space that should be used to interpret
|
9886
9885
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9887
|
-
# applications
|
9888
|
-
#
|
9889
|
-
#
|
9890
|
-
#
|
9891
|
-
#
|
9892
|
-
# protocolor.
|
9893
|
-
#
|
9894
|
-
#
|
9895
|
-
# float
|
9896
|
-
# float
|
9897
|
-
#
|
9898
|
-
#
|
9899
|
-
#
|
9900
|
-
#
|
9901
|
-
#
|
9902
|
-
#
|
9903
|
-
#
|
9904
|
-
#
|
9905
|
-
#
|
9906
|
-
#
|
9907
|
-
#
|
9908
|
-
#
|
9909
|
-
#
|
9910
|
-
#
|
9911
|
-
#
|
9886
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9887
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9888
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9889
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9890
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9891
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9892
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9893
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9894
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9895
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9896
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9897
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9898
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9899
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9900
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9901
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9902
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9903
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9904
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9905
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9906
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9907
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9908
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9909
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9910
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9912
9911
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9913
9912
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9914
9913
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9915
|
-
#
|
9914
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9916
9915
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
9917
|
-
# ', alphaFrac, ')'].join(''); `; var
|
9918
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
9919
|
-
#
|
9920
|
-
#
|
9921
|
-
#
|
9922
|
-
#
|
9916
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9917
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9918
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9919
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9920
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9921
|
+
# / ...
|
9923
9922
|
# Corresponds to the JSON property `noDataColor`
|
9924
9923
|
# @return [Google::Apis::SheetsV4::Color]
|
9925
9924
|
attr_accessor :no_data_color
|
@@ -9962,49 +9961,49 @@ module Google
|
|
9962
9961
|
|
9963
9962
|
# Represents a color in the RGBA color space. This representation is designed
|
9964
9963
|
# for simplicity of conversion to/from color representations in various
|
9965
|
-
# languages over compactness
|
9966
|
-
# be trivially provided to the constructor of
|
9967
|
-
# also be trivially provided to UIColor's
|
9964
|
+
# languages over compactness. For example, the fields of this representation can
|
9965
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9966
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9968
9967
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9969
|
-
# CSS
|
9968
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9970
9969
|
# information about the absolute color space that should be used to interpret
|
9971
9970
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
9972
|
-
# applications
|
9973
|
-
#
|
9974
|
-
#
|
9975
|
-
#
|
9976
|
-
#
|
9977
|
-
# protocolor.
|
9978
|
-
#
|
9979
|
-
#
|
9980
|
-
# float
|
9981
|
-
# float
|
9982
|
-
#
|
9983
|
-
#
|
9984
|
-
#
|
9985
|
-
#
|
9986
|
-
#
|
9987
|
-
#
|
9988
|
-
#
|
9989
|
-
#
|
9990
|
-
#
|
9991
|
-
#
|
9992
|
-
#
|
9993
|
-
#
|
9994
|
-
#
|
9995
|
-
#
|
9996
|
-
#
|
9971
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9972
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9973
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9974
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9975
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9976
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9977
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9978
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9979
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9980
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9981
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9982
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9983
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9984
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9985
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9986
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9987
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9988
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9989
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9990
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9991
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9992
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9993
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9994
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9995
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9997
9996
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9998
9997
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9999
9998
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
10000
|
-
#
|
9999
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
10001
10000
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
10002
|
-
# ', alphaFrac, ')'].join(''); `; var
|
10003
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
10004
|
-
#
|
10005
|
-
#
|
10006
|
-
#
|
10007
|
-
#
|
10001
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
10002
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
10003
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
10004
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
10005
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
10006
|
+
# / ...
|
10008
10007
|
# Corresponds to the JSON property `headerColor`
|
10009
10008
|
# @return [Google::Apis::SheetsV4::Color]
|
10010
10009
|
attr_accessor :header_color
|
@@ -11032,49 +11031,49 @@ module Google
|
|
11032
11031
|
|
11033
11032
|
# Represents a color in the RGBA color space. This representation is designed
|
11034
11033
|
# for simplicity of conversion to/from color representations in various
|
11035
|
-
# languages over compactness
|
11036
|
-
# be trivially provided to the constructor of
|
11037
|
-
# also be trivially provided to UIColor's
|
11034
|
+
# languages over compactness. For example, the fields of this representation can
|
11035
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
11036
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
11038
11037
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
11039
|
-
# CSS
|
11038
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
11040
11039
|
# information about the absolute color space that should be used to interpret
|
11041
11040
|
# the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
|
11042
|
-
# applications
|
11043
|
-
#
|
11044
|
-
#
|
11045
|
-
#
|
11046
|
-
#
|
11047
|
-
# protocolor.
|
11048
|
-
#
|
11049
|
-
#
|
11050
|
-
# float
|
11051
|
-
# float
|
11052
|
-
#
|
11053
|
-
#
|
11054
|
-
#
|
11055
|
-
#
|
11056
|
-
#
|
11057
|
-
#
|
11058
|
-
#
|
11059
|
-
#
|
11060
|
-
#
|
11061
|
-
#
|
11062
|
-
#
|
11063
|
-
#
|
11064
|
-
#
|
11065
|
-
#
|
11066
|
-
#
|
11041
|
+
# applications should assume the sRGB color space. When color equality needs to
|
11042
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
11043
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
11044
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
11045
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
11046
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
11047
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
11048
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
11049
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
11050
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
11051
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
11052
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
11053
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
11054
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
11055
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
11056
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
11057
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
11058
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
11059
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
11060
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
11061
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
11062
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
11063
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
11064
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
11065
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
11067
11066
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
11068
11067
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
11069
11068
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
11070
|
-
#
|
11069
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
11071
11070
|
# 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
|
11072
|
-
# ', alphaFrac, ')'].join(''); `; var
|
11073
|
-
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var
|
11074
|
-
#
|
11075
|
-
#
|
11076
|
-
#
|
11077
|
-
#
|
11071
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
11072
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
11073
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
11074
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
11075
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
11076
|
+
# / ...
|
11078
11077
|
# Corresponds to the JSON property `color`
|
11079
11078
|
# @return [Google::Apis::SheetsV4::Color]
|
11080
11079
|
attr_accessor :color
|