google-apis-sheets_v4 0.2.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/lib/google/apis/sheets_v4.rb +1 -1
- data/lib/google/apis/sheets_v4/classes.rb +1196 -1169
- data/lib/google/apis/sheets_v4/gem_version.rb +3 -3
- data/lib/google/apis/sheets_v4/representations.rb +15 -0
- data/lib/google/apis/sheets_v4/service.rb +10 -10
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00700ffae1218105139766e79945b820664869d9e1f27742b69fdf35a47bfbce
|
4
|
+
data.tar.gz: f78cd1b8af9f1b0965d79f6fbe1d9843a860e8fa472b8157ea4a34c75cbfa91c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56ae42d660c0e6bcd1949cb9926ea658c0bce70734889370c9df0d5da00078b972ee92c597bfbb98ffbc3a9d8ee78f8a664667a30a21d577438777dd6de3e8ac
|
7
|
+
data.tar.gz: 7ae1b29a791c69f5390c493442d5ceb44e830e204ea697439a58659923efd7170e2493275e87981be47c4606f1fc1e78f69eda3b81c5fc96d42e5c52593fd7c1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Release history for google-apis-sheets_v4
|
2
2
|
|
3
|
+
### v0.7.0 (2021-06-24)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210527
|
6
|
+
* Regenerated using generator version 0.3.0
|
7
|
+
|
8
|
+
### v0.6.0 (2021-05-20)
|
9
|
+
|
10
|
+
* Unspecified changes
|
11
|
+
|
12
|
+
### v0.5.0 (2021-05-12)
|
13
|
+
|
14
|
+
* Regenerated from discovery document revision 20210504
|
15
|
+
|
16
|
+
### v0.4.0 (2021-03-23)
|
17
|
+
|
18
|
+
* Regenerated from discovery document revision 20210316
|
19
|
+
|
20
|
+
### v0.3.0 (2021-03-18)
|
21
|
+
|
22
|
+
* Regenerated from discovery document revision 20210309
|
23
|
+
* Regenerated using generator version 0.2.0
|
24
|
+
|
3
25
|
### v0.2.0 (2021-03-04)
|
4
26
|
|
5
27
|
* Regenerated from discovery document revision 20210223
|
@@ -32,7 +32,7 @@ module Google
|
|
32
32
|
# See, edit, create, and delete all of your Google Drive files
|
33
33
|
AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
|
34
34
|
|
35
|
-
#
|
35
|
+
# See, edit, create, and delete only the specific Google Drive files you use with this app
|
36
36
|
AUTH_DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file'
|
37
37
|
|
38
38
|
# See and download all your Google Drive files
|
@@ -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
|
@@ -1540,7 +1540,7 @@ module Google
|
|
1540
1540
|
class BatchClearValuesRequest
|
1541
1541
|
include Google::Apis::Core::Hashable
|
1542
1542
|
|
1543
|
-
# The ranges to clear, in A1 notation.
|
1543
|
+
# The ranges to clear, in A1 or R1C1 notation.
|
1544
1544
|
# Corresponds to the JSON property `ranges`
|
1545
1545
|
# @return [Array<String>]
|
1546
1546
|
attr_accessor :ranges
|
@@ -1595,7 +1595,7 @@ module Google
|
|
1595
1595
|
|
1596
1596
|
# How dates, times, and durations should be represented in the output. This is
|
1597
1597
|
# ignored if value_render_option is FORMATTED_VALUE. The default dateTime render
|
1598
|
-
# option is
|
1598
|
+
# option is SERIAL_NUMBER.
|
1599
1599
|
# Corresponds to the JSON property `dateTimeRenderOption`
|
1600
1600
|
# @return [String]
|
1601
1601
|
attr_accessor :date_time_render_option
|
@@ -1609,7 +1609,7 @@ module Google
|
|
1609
1609
|
attr_accessor :major_dimension
|
1610
1610
|
|
1611
1611
|
# How values should be represented in the output. The default render option is
|
1612
|
-
#
|
1612
|
+
# FORMATTED_VALUE.
|
1613
1613
|
# Corresponds to the JSON property `valueRenderOption`
|
1614
1614
|
# @return [String]
|
1615
1615
|
attr_accessor :value_render_option
|
@@ -1779,13 +1779,13 @@ module Google
|
|
1779
1779
|
|
1780
1780
|
# Determines how dates, times, and durations in the response should be rendered.
|
1781
1781
|
# This is ignored if response_value_render_option is FORMATTED_VALUE. The
|
1782
|
-
# default dateTime render option is
|
1782
|
+
# default dateTime render option is SERIAL_NUMBER.
|
1783
1783
|
# Corresponds to the JSON property `responseDateTimeRenderOption`
|
1784
1784
|
# @return [String]
|
1785
1785
|
attr_accessor :response_date_time_render_option
|
1786
1786
|
|
1787
1787
|
# Determines how values in the response should be rendered. The default render
|
1788
|
-
# option is
|
1788
|
+
# option is FORMATTED_VALUE.
|
1789
1789
|
# Corresponds to the JSON property `responseValueRenderOption`
|
1790
1790
|
# @return [String]
|
1791
1791
|
attr_accessor :response_value_render_option
|
@@ -1880,13 +1880,13 @@ module Google
|
|
1880
1880
|
|
1881
1881
|
# Determines how dates, times, and durations in the response should be rendered.
|
1882
1882
|
# This is ignored if response_value_render_option is FORMATTED_VALUE. The
|
1883
|
-
# default dateTime render option is
|
1883
|
+
# default dateTime render option is SERIAL_NUMBER.
|
1884
1884
|
# Corresponds to the JSON property `responseDateTimeRenderOption`
|
1885
1885
|
# @return [String]
|
1886
1886
|
attr_accessor :response_date_time_render_option
|
1887
1887
|
|
1888
1888
|
# Determines how values in the response should be rendered. The default render
|
1889
|
-
# option is
|
1889
|
+
# option is FORMATTED_VALUE.
|
1890
1890
|
# Corresponds to the JSON property `responseValueRenderOption`
|
1891
1891
|
# @return [String]
|
1892
1892
|
attr_accessor :response_value_render_option
|
@@ -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
|
@@ -2498,7 +2498,10 @@ module Google
|
|
2498
2498
|
|
2499
2499
|
# A hyperlink this cell points to, if any. If the cell contains multiple
|
2500
2500
|
# hyperlinks, this field will be empty. This field is read-only. To set it, use
|
2501
|
-
# a `=HYPERLINK` formula in the userEnteredValue.formulaValue field.
|
2501
|
+
# a `=HYPERLINK` formula in the userEnteredValue.formulaValue field. A cell-
|
2502
|
+
# level link can also be set from the userEnteredFormat.textFormat field.
|
2503
|
+
# Alternatively, set a hyperlink in the textFormatRun.format.link field that
|
2504
|
+
# spans the entire cell.
|
2502
2505
|
# Corresponds to the JSON property `hyperlink`
|
2503
2506
|
# @return [String]
|
2504
2507
|
attr_accessor :hyperlink
|
@@ -2560,49 +2563,49 @@ module Google
|
|
2560
2563
|
|
2561
2564
|
# Represents a color in the RGBA color space. This representation is designed
|
2562
2565
|
# 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
|
2566
|
+
# languages over compactness. For example, the fields of this representation can
|
2567
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2568
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2566
2569
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2567
|
-
# CSS
|
2570
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2568
2571
|
# information about the absolute color space that should be used to interpret
|
2569
2572
|
# 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
|
-
#
|
2573
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2574
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2575
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2576
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2577
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2578
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2579
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2580
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2581
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2582
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2583
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2584
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2585
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2586
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2587
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2588
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2589
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2590
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2591
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2592
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2593
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2594
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2595
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2596
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2597
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2595
2598
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2596
2599
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2597
2600
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2598
|
-
#
|
2601
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2599
2602
|
# 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
|
-
#
|
2603
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2604
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2605
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2606
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2607
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2608
|
+
# / ...
|
2606
2609
|
# Corresponds to the JSON property `backgroundColor`
|
2607
2610
|
# @return [Google::Apis::SheetsV4::Color]
|
2608
2611
|
attr_accessor :background_color
|
@@ -2913,49 +2916,49 @@ module Google
|
|
2913
2916
|
|
2914
2917
|
# Represents a color in the RGBA color space. This representation is designed
|
2915
2918
|
# 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
|
2919
|
+
# languages over compactness. For example, the fields of this representation can
|
2920
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
2921
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
2919
2922
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
2920
|
-
# CSS
|
2923
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
2921
2924
|
# information about the absolute color space that should be used to interpret
|
2922
2925
|
# 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
|
-
#
|
2926
|
+
# applications should assume the sRGB color space. When color equality needs to
|
2927
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
2928
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
2929
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
2930
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
2931
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
2932
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
2933
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
2934
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
2935
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
2936
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
2937
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
2938
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
2939
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
2940
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
2941
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
2942
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
2943
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
2944
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
2945
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
2946
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
2947
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
2948
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
2949
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
2950
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
2948
2951
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
2949
2952
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
2950
2953
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
2951
|
-
#
|
2954
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
2952
2955
|
# 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
|
-
#
|
2956
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
2957
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
2958
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
2959
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
2960
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
2961
|
+
# / ...
|
2959
2962
|
# Corresponds to the JSON property `backgroundColor`
|
2960
2963
|
# @return [Google::Apis::SheetsV4::Color]
|
2961
2964
|
attr_accessor :background_color
|
@@ -3189,61 +3192,60 @@ module Google
|
|
3189
3192
|
|
3190
3193
|
# Represents a color in the RGBA color space. This representation is designed
|
3191
3194
|
# 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
|
3195
|
+
# languages over compactness. For example, the fields of this representation can
|
3196
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3197
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3195
3198
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3196
|
-
# CSS
|
3199
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3197
3200
|
# information about the absolute color space that should be used to interpret
|
3198
3201
|
# 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
|
-
#
|
3202
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3203
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3204
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3205
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3206
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3207
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3208
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3209
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3210
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3211
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3212
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3213
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3214
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3215
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3216
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3217
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3218
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3219
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3220
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3221
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3222
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3223
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3224
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3225
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3226
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3224
3227
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3225
3228
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3226
3229
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3227
|
-
#
|
3230
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3228
3231
|
# 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
|
-
#
|
3232
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3233
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3234
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3235
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3236
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3237
|
+
# / ...
|
3235
3238
|
class Color
|
3236
3239
|
include Google::Apis::Core::Hashable
|
3237
3240
|
|
3238
3241
|
# 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
|
3242
|
+
# final pixel color is defined by the equation: `pixel color = alpha * (this
|
3243
|
+
# color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
|
3241
3244
|
# corresponds to a solid color, whereas a value of 0.0 corresponds to a
|
3242
3245
|
# completely transparent color. This uses a wrapper message rather than a simple
|
3243
3246
|
# 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).
|
3247
|
+
# the value being unset. If omitted, this color object is rendered as a solid
|
3248
|
+
# color (as if the alpha value had been explicitly given a value of 1.0).
|
3247
3249
|
# Corresponds to the JSON property `alpha`
|
3248
3250
|
# @return [Float]
|
3249
3251
|
attr_accessor :alpha
|
@@ -3282,49 +3284,49 @@ module Google
|
|
3282
3284
|
|
3283
3285
|
# Represents a color in the RGBA color space. This representation is designed
|
3284
3286
|
# 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
|
3287
|
+
# languages over compactness. For example, the fields of this representation can
|
3288
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
3289
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
3288
3290
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
3289
|
-
# CSS
|
3291
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
3290
3292
|
# information about the absolute color space that should be used to interpret
|
3291
3293
|
# 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
|
-
#
|
3294
|
+
# applications should assume the sRGB color space. When color equality needs to
|
3295
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
3296
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
3297
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
3298
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
3299
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
3300
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
3301
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
3302
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
3303
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
3304
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
3305
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
3306
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
3307
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
3308
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
3309
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
3310
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
3311
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
3312
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
3313
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
3314
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
3315
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
3316
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
3317
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
3318
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
3317
3319
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
3318
3320
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
3319
3321
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
3320
|
-
#
|
3322
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
3321
3323
|
# 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
|
-
#
|
3324
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
3325
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
3326
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
3327
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
3328
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
3329
|
+
# / ...
|
3328
3330
|
# Corresponds to the JSON property `rgbColor`
|
3329
3331
|
# @return [Google::Apis::SheetsV4::Color]
|
3330
3332
|
attr_accessor :rgb_color
|
@@ -4748,8 +4750,8 @@ module Google
|
|
4748
4750
|
class DeleteSheetRequest
|
4749
4751
|
include Google::Apis::Core::Hashable
|
4750
4752
|
|
4751
|
-
# The ID of the sheet to delete. If the sheet is of
|
4752
|
-
#
|
4753
|
+
# The ID of the sheet to delete. If the sheet is of DATA_SOURCE type, the
|
4754
|
+
# associated DataSource is also deleted.
|
4753
4755
|
# Corresponds to the JSON property `sheetId`
|
4754
4756
|
# @return [Fixnum]
|
4755
4757
|
attr_accessor :sheet_id
|
@@ -5241,49 +5243,49 @@ module Google
|
|
5241
5243
|
|
5242
5244
|
# Represents a color in the RGBA color space. This representation is designed
|
5243
5245
|
# 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
|
5246
|
+
# languages over compactness. For example, the fields of this representation can
|
5247
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5248
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5247
5249
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5248
|
-
# CSS
|
5250
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5249
5251
|
# information about the absolute color space that should be used to interpret
|
5250
5252
|
# 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
|
-
#
|
5253
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5254
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5255
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5256
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5257
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5258
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5259
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5260
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5261
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5262
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5263
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5264
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5265
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5266
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5267
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5268
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5269
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5270
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5271
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5272
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5273
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5274
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5275
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5276
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5277
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5276
5278
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5277
5279
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5278
5280
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5279
|
-
#
|
5281
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5280
5282
|
# 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
|
-
#
|
5283
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5284
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5285
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5286
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5287
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5288
|
+
# / ...
|
5287
5289
|
# Corresponds to the JSON property `color`
|
5288
5290
|
# @return [Google::Apis::SheetsV4::Color]
|
5289
5291
|
attr_accessor :color
|
@@ -5384,7 +5386,7 @@ module Google
|
|
5384
5386
|
attr_accessor :formula_value
|
5385
5387
|
|
5386
5388
|
# Represents a double value. Note: Dates, Times and DateTimes are represented as
|
5387
|
-
# doubles in
|
5389
|
+
# doubles in SERIAL_NUMBER format.
|
5388
5390
|
# Corresponds to the JSON property `numberValue`
|
5389
5391
|
# @return [Float]
|
5390
5392
|
attr_accessor :number_value
|
@@ -5427,49 +5429,49 @@ module Google
|
|
5427
5429
|
|
5428
5430
|
# Represents a color in the RGBA color space. This representation is designed
|
5429
5431
|
# 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
|
5432
|
+
# languages over compactness. For example, the fields of this representation can
|
5433
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5434
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5433
5435
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5434
|
-
# CSS
|
5436
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5435
5437
|
# information about the absolute color space that should be used to interpret
|
5436
5438
|
# 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
|
-
#
|
5439
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5440
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5441
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5442
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5443
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5444
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5445
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5446
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5447
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5448
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5449
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5450
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5451
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5452
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5453
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5454
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5455
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5456
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5457
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5458
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5459
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5460
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5461
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5462
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5463
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5462
5464
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5463
5465
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5464
5466
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5465
|
-
#
|
5467
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5466
5468
|
# 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
|
-
#
|
5469
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5470
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5471
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5472
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5473
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5474
|
+
# / ...
|
5473
5475
|
# Corresponds to the JSON property `visibleBackgroundColor`
|
5474
5476
|
# @return [Google::Apis::SheetsV4::Color]
|
5475
5477
|
attr_accessor :visible_background_color
|
@@ -5481,49 +5483,49 @@ module Google
|
|
5481
5483
|
|
5482
5484
|
# Represents a color in the RGBA color space. This representation is designed
|
5483
5485
|
# 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
|
5486
|
+
# languages over compactness. For example, the fields of this representation can
|
5487
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
5488
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
5487
5489
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
5488
|
-
# CSS
|
5490
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
5489
5491
|
# information about the absolute color space that should be used to interpret
|
5490
5492
|
# 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
|
-
#
|
5493
|
+
# applications should assume the sRGB color space. When color equality needs to
|
5494
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
5495
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
5496
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
5497
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
5498
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
5499
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
5500
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
5501
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
5502
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
5503
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
5504
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
5505
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
5506
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
5507
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
5508
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
5509
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
5510
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
5511
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
5512
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
5513
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
5514
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
5515
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
5516
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
5517
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
5516
5518
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
5517
5519
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
5518
5520
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
5519
|
-
#
|
5521
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
5520
5522
|
# 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
|
-
#
|
5523
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
5524
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
5525
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
5526
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
5527
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
5528
|
+
# / ...
|
5527
5529
|
# Corresponds to the JSON property `visibleForegroundColor`
|
5528
5530
|
# @return [Google::Apis::SheetsV4::Color]
|
5529
5531
|
attr_accessor :visible_foreground_color
|
@@ -6154,49 +6156,49 @@ module Google
|
|
6154
6156
|
|
6155
6157
|
# Represents a color in the RGBA color space. This representation is designed
|
6156
6158
|
# 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
|
6159
|
+
# languages over compactness. For example, the fields of this representation can
|
6160
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6161
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6160
6162
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6161
|
-
# CSS
|
6163
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6162
6164
|
# information about the absolute color space that should be used to interpret
|
6163
6165
|
# 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
|
-
#
|
6166
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6167
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6168
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6169
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6170
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6171
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6172
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6173
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6174
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6175
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6176
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6177
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6178
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6179
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6180
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6181
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6182
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6183
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6184
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6185
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6186
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6187
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6188
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6189
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6190
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6189
6191
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6190
6192
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6191
6193
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6192
|
-
#
|
6194
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6193
6195
|
# 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
|
-
#
|
6196
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6197
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6198
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6199
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6200
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6201
|
+
# / ...
|
6200
6202
|
# Corresponds to the JSON property `barColor`
|
6201
6203
|
# @return [Google::Apis::SheetsV4::Color]
|
6202
6204
|
attr_accessor :bar_color
|
@@ -6304,49 +6306,49 @@ module Google
|
|
6304
6306
|
|
6305
6307
|
# Represents a color in the RGBA color space. This representation is designed
|
6306
6308
|
# 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
|
6309
|
+
# languages over compactness. For example, the fields of this representation can
|
6310
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6311
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6310
6312
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6311
|
-
# CSS
|
6313
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6312
6314
|
# information about the absolute color space that should be used to interpret
|
6313
6315
|
# 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
|
-
#
|
6316
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6317
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6318
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6319
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6320
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6321
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6322
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6323
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6324
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6325
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6326
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6327
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6328
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6329
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6330
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6331
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6332
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6333
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6334
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6335
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6336
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6337
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6338
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6339
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6340
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6339
6341
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6340
6342
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6341
6343
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6342
|
-
#
|
6344
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6343
6345
|
# 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
|
-
#
|
6346
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6347
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6348
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6349
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6350
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6351
|
+
# / ...
|
6350
6352
|
# Corresponds to the JSON property `color`
|
6351
6353
|
# @return [Google::Apis::SheetsV4::Color]
|
6352
6354
|
attr_accessor :color
|
@@ -6489,6 +6491,25 @@ module Google
|
|
6489
6491
|
end
|
6490
6492
|
end
|
6491
6493
|
|
6494
|
+
# An external or local reference.
|
6495
|
+
class Link
|
6496
|
+
include Google::Apis::Core::Hashable
|
6497
|
+
|
6498
|
+
# The link identifier.
|
6499
|
+
# Corresponds to the JSON property `uri`
|
6500
|
+
# @return [String]
|
6501
|
+
attr_accessor :uri
|
6502
|
+
|
6503
|
+
def initialize(**args)
|
6504
|
+
update!(**args)
|
6505
|
+
end
|
6506
|
+
|
6507
|
+
# Update properties of this object
|
6508
|
+
def update!(**args)
|
6509
|
+
@uri = args[:uri] if args.key?(:uri)
|
6510
|
+
end
|
6511
|
+
end
|
6512
|
+
|
6492
6513
|
# Allows you to manually organize the values in a source data column into
|
6493
6514
|
# buckets with names of your choosing. For example, a pivot table that
|
6494
6515
|
# aggregates population by state: +-------+-------------------+ | State | SUM of
|
@@ -6768,49 +6789,49 @@ module Google
|
|
6768
6789
|
|
6769
6790
|
# Represents a color in the RGBA color space. This representation is designed
|
6770
6791
|
# 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
|
6792
|
+
# languages over compactness. For example, the fields of this representation can
|
6793
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6794
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6774
6795
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6775
|
-
# CSS
|
6796
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6776
6797
|
# information about the absolute color space that should be used to interpret
|
6777
6798
|
# 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
|
-
#
|
6799
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6800
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6801
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6802
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6803
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6804
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6805
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6806
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6807
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6808
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6809
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6810
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6811
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6812
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6813
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6814
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6815
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6816
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6817
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6818
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6819
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6820
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6821
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6822
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6823
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6803
6824
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6804
6825
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6805
6826
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6806
|
-
#
|
6827
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6807
6828
|
# 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
|
-
#
|
6829
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6830
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6831
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6832
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6833
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6834
|
+
# / ...
|
6814
6835
|
# Corresponds to the JSON property `nodeColor`
|
6815
6836
|
# @return [Google::Apis::SheetsV4::Color]
|
6816
6837
|
attr_accessor :node_color
|
@@ -6832,49 +6853,49 @@ module Google
|
|
6832
6853
|
|
6833
6854
|
# Represents a color in the RGBA color space. This representation is designed
|
6834
6855
|
# 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
|
6856
|
+
# languages over compactness. For example, the fields of this representation can
|
6857
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
6858
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
6838
6859
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
6839
|
-
# CSS
|
6860
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
6840
6861
|
# information about the absolute color space that should be used to interpret
|
6841
6862
|
# 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
|
-
#
|
6863
|
+
# applications should assume the sRGB color space. When color equality needs to
|
6864
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
6865
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
6866
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
6867
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
6868
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
6869
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
6870
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
6871
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
6872
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
6873
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
6874
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
6875
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
6876
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
6877
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
6878
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
6879
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
6880
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
6881
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
6882
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
6883
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
6884
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
6885
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
6886
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
6887
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
6867
6888
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
6868
6889
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
6869
6890
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
6870
|
-
#
|
6891
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
6871
6892
|
# 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
|
-
#
|
6893
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
6894
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
6895
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
6896
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
6897
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
6898
|
+
# / ...
|
6878
6899
|
# Corresponds to the JSON property `selectedNodeColor`
|
6879
6900
|
# @return [Google::Apis::SheetsV4::Color]
|
6880
6901
|
attr_accessor :selected_node_color
|
@@ -7182,7 +7203,7 @@ module Google
|
|
7182
7203
|
|
7183
7204
|
# True if the headings in this pivot group should be repeated. This is only
|
7184
7205
|
# valid for row groupings and is ignored by columns. By default, we minimize
|
7185
|
-
#
|
7206
|
+
# repetition of headings by not showing higher level headings where they are the
|
7186
7207
|
# same. For example, even though the third row below corresponds to "Q1 Mar", "
|
7187
7208
|
# Q1" is not shown because it is redundant with previous rows. Setting
|
7188
7209
|
# repeat_headings to true would cause "Q1" to be repeated for "Feb" and "Mar". +-
|
@@ -8802,49 +8823,49 @@ module Google
|
|
8802
8823
|
|
8803
8824
|
# Represents a color in the RGBA color space. This representation is designed
|
8804
8825
|
# 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
|
8826
|
+
# languages over compactness. For example, the fields of this representation can
|
8827
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8828
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8808
8829
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8809
|
-
# CSS
|
8830
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8810
8831
|
# information about the absolute color space that should be used to interpret
|
8811
8832
|
# 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
|
-
#
|
8833
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8834
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8835
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8836
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8837
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8838
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8839
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8840
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8841
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8842
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8843
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8844
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8845
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8846
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8847
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8848
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8849
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8850
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8851
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8852
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8853
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8854
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8855
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8856
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8857
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8837
8858
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8838
8859
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8839
8860
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8840
|
-
#
|
8861
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8841
8862
|
# 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
|
-
#
|
8863
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8864
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8865
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8866
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8867
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8868
|
+
# / ...
|
8848
8869
|
# Corresponds to the JSON property `tabColor`
|
8849
8870
|
# @return [Google::Apis::SheetsV4::Color]
|
8850
8871
|
attr_accessor :tab_color
|
@@ -8921,49 +8942,49 @@ module Google
|
|
8921
8942
|
|
8922
8943
|
# Represents a color in the RGBA color space. This representation is designed
|
8923
8944
|
# 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
|
8945
|
+
# languages over compactness. For example, the fields of this representation can
|
8946
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
8947
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
8927
8948
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
8928
|
-
# CSS
|
8949
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
8929
8950
|
# information about the absolute color space that should be used to interpret
|
8930
8951
|
# 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
|
-
#
|
8952
|
+
# applications should assume the sRGB color space. When color equality needs to
|
8953
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
8954
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
8955
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
8956
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
8957
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
8958
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
8959
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
8960
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
8961
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
8962
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
8963
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
8964
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
8965
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
8966
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
8967
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
8968
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
8969
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
8970
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
8971
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
8972
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
8973
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
8974
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
8975
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
8976
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
8956
8977
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
8957
8978
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
8958
8979
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
8959
|
-
#
|
8980
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
8960
8981
|
# 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
|
-
#
|
8982
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
8983
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
8984
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
8985
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
8986
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
8987
|
+
# / ...
|
8967
8988
|
# Corresponds to the JSON property `backgroundColor`
|
8968
8989
|
# @return [Google::Apis::SheetsV4::Color]
|
8969
8990
|
attr_accessor :background_color
|
@@ -9079,49 +9100,49 @@ module Google
|
|
9079
9100
|
|
9080
9101
|
# Represents a color in the RGBA color space. This representation is designed
|
9081
9102
|
# 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
|
9103
|
+
# languages over compactness. For example, the fields of this representation can
|
9104
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9105
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9085
9106
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9086
|
-
# CSS
|
9107
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9087
9108
|
# information about the absolute color space that should be used to interpret
|
9088
9109
|
# 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
|
-
#
|
9110
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9111
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9112
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9113
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9114
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9115
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9116
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9117
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9118
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9119
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9120
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9121
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9122
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9123
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9124
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9125
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9126
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9127
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9128
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9129
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9130
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9131
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9132
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9133
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9134
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9114
9135
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9115
9136
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9116
9137
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9117
|
-
#
|
9138
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9118
9139
|
# 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
|
-
#
|
9140
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9141
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9142
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9143
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9144
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9145
|
+
# / ...
|
9125
9146
|
# Corresponds to the JSON property `backgroundColor`
|
9126
9147
|
# @return [Google::Apis::SheetsV4::Color]
|
9127
9148
|
attr_accessor :background_color
|
@@ -9143,49 +9164,49 @@ module Google
|
|
9143
9164
|
|
9144
9165
|
# Represents a color in the RGBA color space. This representation is designed
|
9145
9166
|
# 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
|
9167
|
+
# languages over compactness. For example, the fields of this representation can
|
9168
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9169
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9149
9170
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9150
|
-
# CSS
|
9171
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9151
9172
|
# information about the absolute color space that should be used to interpret
|
9152
9173
|
# 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
|
-
#
|
9174
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9175
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9176
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9177
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9178
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9179
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9180
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9181
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9182
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9183
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9184
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9185
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9186
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9187
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9188
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9189
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9190
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9191
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9192
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9193
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9194
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9195
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9196
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9197
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9198
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9178
9199
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9179
9200
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9180
9201
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9181
|
-
#
|
9202
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9182
9203
|
# 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
|
-
#
|
9204
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9205
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9206
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9207
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9208
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9209
|
+
# / ...
|
9189
9210
|
# Corresponds to the JSON property `foregroundColor`
|
9190
9211
|
# @return [Google::Apis::SheetsV4::Color]
|
9191
9212
|
attr_accessor :foreground_color
|
@@ -9433,49 +9454,49 @@ module Google
|
|
9433
9454
|
|
9434
9455
|
# Represents a color in the RGBA color space. This representation is designed
|
9435
9456
|
# 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
|
9457
|
+
# languages over compactness. For example, the fields of this representation can
|
9458
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9459
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9439
9460
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9440
|
-
# CSS
|
9461
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9441
9462
|
# information about the absolute color space that should be used to interpret
|
9442
9463
|
# 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
|
-
#
|
9464
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9465
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9466
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9467
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9468
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9469
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9470
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9471
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9472
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9473
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9474
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9475
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9476
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9477
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9478
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9479
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9480
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9481
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9482
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9483
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9484
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9485
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9486
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9487
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9488
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9468
9489
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9469
9490
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9470
9491
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9471
|
-
#
|
9492
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9472
9493
|
# 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
|
-
#
|
9494
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9495
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9496
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9497
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9498
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9499
|
+
# / ...
|
9479
9500
|
# Corresponds to the JSON property `foregroundColor`
|
9480
9501
|
# @return [Google::Apis::SheetsV4::Color]
|
9481
9502
|
attr_accessor :foreground_color
|
@@ -9491,6 +9512,11 @@ module Google
|
|
9491
9512
|
attr_accessor :italic
|
9492
9513
|
alias_method :italic?, :italic
|
9493
9514
|
|
9515
|
+
# An external or local reference.
|
9516
|
+
# Corresponds to the JSON property `link`
|
9517
|
+
# @return [Google::Apis::SheetsV4::Link]
|
9518
|
+
attr_accessor :link
|
9519
|
+
|
9494
9520
|
# True if the text has a strikethrough.
|
9495
9521
|
# Corresponds to the JSON property `strikethrough`
|
9496
9522
|
# @return [Boolean]
|
@@ -9515,6 +9541,7 @@ module Google
|
|
9515
9541
|
@foreground_color = args[:foreground_color] if args.key?(:foreground_color)
|
9516
9542
|
@foreground_color_style = args[:foreground_color_style] if args.key?(:foreground_color_style)
|
9517
9543
|
@italic = args[:italic] if args.key?(:italic)
|
9544
|
+
@link = args[:link] if args.key?(:link)
|
9518
9545
|
@strikethrough = args[:strikethrough] if args.key?(:strikethrough)
|
9519
9546
|
@underline = args[:underline] if args.key?(:underline)
|
9520
9547
|
end
|
@@ -9715,49 +9742,49 @@ module Google
|
|
9715
9742
|
|
9716
9743
|
# Represents a color in the RGBA color space. This representation is designed
|
9717
9744
|
# 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
|
9745
|
+
# languages over compactness. For example, the fields of this representation can
|
9746
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9747
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9721
9748
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9722
|
-
# CSS
|
9749
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9723
9750
|
# information about the absolute color space that should be used to interpret
|
9724
9751
|
# 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
|
-
#
|
9752
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9753
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9754
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9755
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9756
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9757
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9758
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9759
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9760
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9761
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9762
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9763
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9764
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9765
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9766
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9767
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9768
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9769
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9770
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9771
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9772
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9773
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9774
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9775
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9776
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9750
9777
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9751
9778
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9752
9779
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9753
|
-
#
|
9780
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9754
9781
|
# 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
|
-
#
|
9782
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9783
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9784
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9785
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9786
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9787
|
+
# / ...
|
9761
9788
|
# Corresponds to the JSON property `maxValueColor`
|
9762
9789
|
# @return [Google::Apis::SheetsV4::Color]
|
9763
9790
|
attr_accessor :max_value_color
|
@@ -9769,49 +9796,49 @@ module Google
|
|
9769
9796
|
|
9770
9797
|
# Represents a color in the RGBA color space. This representation is designed
|
9771
9798
|
# 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
|
9799
|
+
# languages over compactness. For example, the fields of this representation can
|
9800
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9801
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9775
9802
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9776
|
-
# CSS
|
9803
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9777
9804
|
# information about the absolute color space that should be used to interpret
|
9778
9805
|
# 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
|
-
#
|
9806
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9807
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9808
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9809
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9810
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9811
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9812
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9813
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9814
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9815
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9816
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9817
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9818
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9819
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9820
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9821
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9822
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9823
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9824
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9825
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9826
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9827
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9828
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9829
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9830
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9804
9831
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9805
9832
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9806
9833
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9807
|
-
#
|
9834
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9808
9835
|
# 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
|
-
#
|
9836
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9837
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9838
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9839
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9840
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9841
|
+
# / ...
|
9815
9842
|
# Corresponds to the JSON property `midValueColor`
|
9816
9843
|
# @return [Google::Apis::SheetsV4::Color]
|
9817
9844
|
attr_accessor :mid_value_color
|
@@ -9823,49 +9850,49 @@ module Google
|
|
9823
9850
|
|
9824
9851
|
# Represents a color in the RGBA color space. This representation is designed
|
9825
9852
|
# 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
|
9853
|
+
# languages over compactness. For example, the fields of this representation can
|
9854
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9855
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9829
9856
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9830
|
-
# CSS
|
9857
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9831
9858
|
# information about the absolute color space that should be used to interpret
|
9832
9859
|
# 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
|
-
#
|
9860
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9861
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9862
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9863
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9864
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9865
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9866
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9867
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9868
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9869
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9870
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9871
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9872
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9873
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9874
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9875
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9876
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9877
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9878
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9879
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9880
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9881
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9882
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9883
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9884
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9858
9885
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9859
9886
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9860
9887
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9861
|
-
#
|
9888
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9862
9889
|
# 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
|
-
#
|
9890
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9891
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9892
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9893
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9894
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9895
|
+
# / ...
|
9869
9896
|
# Corresponds to the JSON property `minValueColor`
|
9870
9897
|
# @return [Google::Apis::SheetsV4::Color]
|
9871
9898
|
attr_accessor :min_value_color
|
@@ -9877,49 +9904,49 @@ module Google
|
|
9877
9904
|
|
9878
9905
|
# Represents a color in the RGBA color space. This representation is designed
|
9879
9906
|
# 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
|
9907
|
+
# languages over compactness. For example, the fields of this representation can
|
9908
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9909
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9883
9910
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9884
|
-
# CSS
|
9911
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9885
9912
|
# information about the absolute color space that should be used to interpret
|
9886
9913
|
# 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
|
-
#
|
9914
|
+
# applications should assume the sRGB color space. When color equality needs to
|
9915
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
9916
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
9917
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
9918
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
9919
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
9920
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
9921
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
9922
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
9923
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
9924
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
9925
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
9926
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
9927
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
9928
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
9929
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
9930
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
9931
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
9932
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
9933
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
9934
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
9935
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
9936
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
9937
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
9938
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9912
9939
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9913
9940
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9914
9941
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
9915
|
-
#
|
9942
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
9916
9943
|
# 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
|
-
#
|
9944
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
9945
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
9946
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
9947
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
9948
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
9949
|
+
# / ...
|
9923
9950
|
# Corresponds to the JSON property `noDataColor`
|
9924
9951
|
# @return [Google::Apis::SheetsV4::Color]
|
9925
9952
|
attr_accessor :no_data_color
|
@@ -9962,49 +9989,49 @@ module Google
|
|
9962
9989
|
|
9963
9990
|
# Represents a color in the RGBA color space. This representation is designed
|
9964
9991
|
# 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
|
9992
|
+
# languages over compactness. For example, the fields of this representation can
|
9993
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
9994
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
9968
9995
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
9969
|
-
# CSS
|
9996
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
9970
9997
|
# information about the absolute color space that should be used to interpret
|
9971
9998
|
# 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
|
-
#
|
9999
|
+
# applications should assume the sRGB color space. When color equality needs to
|
10000
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
10001
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
10002
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
10003
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
10004
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
10005
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
10006
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
10007
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
10008
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
10009
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
10010
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
10011
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
10012
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
10013
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
10014
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
10015
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
10016
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
10017
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
10018
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
10019
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
10020
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
10021
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
10022
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
10023
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
9997
10024
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
9998
10025
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
9999
10026
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
10000
|
-
#
|
10027
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
10001
10028
|
# 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
|
-
#
|
10029
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
10030
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
10031
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
10032
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
10033
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
10034
|
+
# / ...
|
10008
10035
|
# Corresponds to the JSON property `headerColor`
|
10009
10036
|
# @return [Google::Apis::SheetsV4::Color]
|
10010
10037
|
attr_accessor :header_color
|
@@ -11032,49 +11059,49 @@ module Google
|
|
11032
11059
|
|
11033
11060
|
# Represents a color in the RGBA color space. This representation is designed
|
11034
11061
|
# 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
|
11062
|
+
# languages over compactness. For example, the fields of this representation can
|
11063
|
+
# be trivially provided to the constructor of `java.awt.Color` in Java; it can
|
11064
|
+
# also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
|
11038
11065
|
# method in iOS; and, with just a little work, it can be easily formatted into a
|
11039
|
-
# CSS
|
11066
|
+
# CSS `rgba()` string in JavaScript. This reference page doesn't carry
|
11040
11067
|
# information about the absolute color space that should be used to interpret
|
11041
11068
|
# 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
|
-
#
|
11069
|
+
# applications should assume the sRGB color space. When color equality needs to
|
11070
|
+
# be decided, implementations, unless documented otherwise, treat two colors as
|
11071
|
+
# equal if all their red, green, blue, and alpha values each differ by at most
|
11072
|
+
# 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
|
11073
|
+
# awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
|
11074
|
+
# protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
|
11075
|
+
# getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
|
11076
|
+
# Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
|
11077
|
+
# float green = (float) color.getGreen(); float blue = (float) color.getBlue();
|
11078
|
+
# float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
|
11079
|
+
# setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
|
11080
|
+
# denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
|
11081
|
+
# setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
|
11082
|
+
# build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
|
11083
|
+
# . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
|
11084
|
+
# float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
|
11085
|
+
# alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
|
11086
|
+
# nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
|
11087
|
+
# green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
|
11088
|
+
# CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
|
11089
|
+
# blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
|
11090
|
+
# result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
|
11091
|
+
# = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
|
11092
|
+
# autorelease]; return result; ` // ... Example (JavaScript): // ... var
|
11093
|
+
# protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
|
11067
11094
|
# var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
|
11068
11095
|
# var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
|
11069
11096
|
# var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
|
11070
|
-
#
|
11097
|
+
# rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
|
11071
11098
|
# 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
|
-
#
|
11099
|
+
# ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
|
11100
|
+
# ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
|
11101
|
+
# = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
|
11102
|
+
# resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
|
11103
|
+
# push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
|
11104
|
+
# / ...
|
11078
11105
|
# Corresponds to the JSON property `color`
|
11079
11106
|
# @return [Google::Apis::SheetsV4::Color]
|
11080
11107
|
attr_accessor :color
|