{"id":614,"date":"2019-01-12T00:54:59","date_gmt":"2019-01-11T15:54:59","guid":{"rendered":"http:\/\/google-apps-script.net\/instructions\/?p=614"},"modified":"2021-02-18T15:09:43","modified_gmt":"2021-02-18T06:09:43","slug":"colors-to-be-applied-to-calendar-events-by-gas","status":"publish","type":"post","link":"https:\/\/for-dummies.net\/gas-noobs\/colors-to-be-applied-to-calendar-events-by-gas\/","title":{"rendered":"\u3010\u30b3\u30d4\u30da\u3067\u4f7f\u3048\u308b\u3011GAS\u3067\u4f7f\u3048\u308b\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u8272\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066"},"content":{"rendered":"<h2>GAS\u7528\u8272\u6307\u5b9a\u30b3\u30fc\u30c9 &#8212; Color<\/h2>\n<p>\u4eca\u56de\u306f\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u8272\u6307\u5b9a\u7528\u306e\u5c02\u7528\u30b3\u30fc\u30c9\u306e\u3054\u7d39\u4ecb\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>\u30ab\u30ec\u30f3\u30c0\u30fc\u30a2\u30d7\u30ea\u3067\u306f\u3001\u8272\u306e\u6307\u5b9a\u65b9\u6cd5\u306b\u306f2\u7a2e\u985e\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u3084\u308a\u65b9\u3068\u66f8\u304d\u65b9\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u7c21\u5358\u306a\u306e\u3067\u3001\u30b3\u30fc\u30c9\u3092\u899a\u3048\u3066\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u8272\u5408\u3044\u3092\u81ea\u5206\u306e\u304a\u6c17\u306b\u5165\u308a\u306b\u8abf\u6574\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><!--more--><\/p>\n<h3>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u3067\u4f7f\u3048\u308b2\u3064\u306e\u8272\u6307\u5b9a\u65b9\u6cd5\u7d39\u4ecb<\/h3>\n<ol>\n<li>\u5341\u516d\u9032\u6cd5\u5f62\u5f0f\u306e\u6587\u5b57\u5217\uff08#2952A3\u306e\u3088\u3046\u306a\u5f62\u5f0f\uff09<\/li>\n<li>GAS\u5c02\u7528CalendarApp.Color\/CalendarApp.EventColor\u3067\u6307\u5b9a<\/li>\n<\/ol>\n<h3>\u5341\u516d\u9032\u6cd5\u5f62\u5f0f\u3067\u306e\u66f8\u304d\u65b9<\/h3>\n<p>\u5341\u516d\u9032\u6cd5\u306e\u5834\u5408\u306f\u3001\u6587\u5b57\u5217\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div id=\"codeheader_js\" class=\"codeheader\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c91<\/div>\n<div id=\"codebox\">\n<pre>\/\/\u5341\u516d\u9032\u6cd5\u5f62\u5f0f\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u8272\u3092\u6307\u5b9a\u3059\u308b\nfunction sampleCode1() {\n  var color = \"#2952A3\";\n  CalendarApp.getDefaultCalendar().setColor(color);\n}\n<\/pre>\n<\/div>\n<h3>\u5c02\u7528\u30b3\u30fc\u30c9\u306e\u66f8\u304d\u65b9<\/h3>\n<p>GAS\u5c02\u7528\u306e\u30b3\u30fc\u30c9\u306e\u5834\u5408\u306f\u3001CalendarApp.Color.RED\/CalendarApp.EventColor.RED\u3068\u3044\u3046\u3088\u3046\u306a\u5f62\u3067\u8272\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4f7f\u3048\u308b\u8272\u306f\u4e0b\u8a18\u306b\u8868\u306b\u307e\u3068\u3081\u3066\u3042\u308a\u307e\u3059\u306e\u3067\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<div id=\"codeheader_js\" class=\"codeheader\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c92<\/div>\n<div id=\"codebox\">\n<pre>\/\/\u5c02\u7528\u30b3\u30fc\u30c9\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u8272\u3092\u6307\u5b9a\u3059\u308b\nfunction sampleCode2() {\n  var color = CalendarApp.Color.RED; \/\/\"#A32929\"\u3067\u3082\u540c\u3058\u7d50\u679c\n  CalendarApp.getDefaultCalendar().setColor(color);\n}\n<\/pre>\n<\/div>\n<div id=\"codeheader_js\" class=\"codeheader\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c93<\/div>\n<div id=\"codebox\">\n<pre>\/\/\u5c02\u7528\u30b3\u30fc\u30c9\u3067\u4f5c\u3063\u305f\u4e88\u5b9a\u306e\u8272\u3092\u6307\u5b9a\u3059\u308b\nfunction sampleCode3() {\n  var calendar = CalendarApp.getDefaultCalendar();\n  var date = new Date();\n  var title = \"Test Event\";\n  var event = calendar.createAllDayEvent(title, date);\n  var color = CalendarApp.EventColor.RED; \/\/\"11\"\u3067\u3082\u540c\u3058\u7d50\u679c\n  event.setColor(color);\n}\n<\/pre>\n<\/div>\n<h3>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u3067\u5229\u7528\u3067\u304d\u308b\u30d7\u30ea\u30bb\u30c3\u30c8\u8272\uff08CalendarApp.Color.\u3007\u3007\u25ef\uff09<\/h3>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\"><strong>\u5c02\u7528\u30b3\u30fc\u30c9<\/strong><\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\"><strong>16\u9032\u6570<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">BLUE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#2952A3<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">BROWN<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#8D6F47<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">CHARCOAL<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#4E5D6C<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">CHESTNUT<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#865A5A<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">GRAY<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#5A6986<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">GREEN<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#0D7813<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">INDIGO<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#5229A3<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">LIME<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#528800<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">MUSTARD<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#88880E<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">OLIVE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#6E6E41<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">ORANGE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#BE6D00<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">PINK<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#B1365F<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">PLUM<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#705770<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">PURPLE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#7A367A<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">RED<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#A32929<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">RED_ORANGE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#B1440E<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">SEA_BLUE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#29527A<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">SLATE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#4A716C<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">TEAL<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#28754E<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">TURQOISE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#1B887A<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">YELLOW<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">#AB8B00<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u3067\u5229\u7528\u3067\u304d\u308b\u30d7\u30ea\u30bb\u30c3\u30c8\u8272\uff08CalendarApp.EventColor.\u25ef\u3007\u3007\uff09<\/h3>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\"><strong>\u5c02\u7528\u30b3\u30fc\u30c9<\/strong><\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\"><strong>\u8272\u756a\u53f7<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">PALE_BLUE<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">1<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">PALE_GREEN<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">2<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">MAUVE<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">3<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">PALE_RED<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">4<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">YELLOW<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">5<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">ORANGE<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">6<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">CYAN<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">7<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; height: 22px; text-align: center;\">GRAY<\/td>\n<td style=\"width: 50%; height: 22px; text-align: center;\">8<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">BLUE<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">9<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">GREEN<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">10<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"width: 50%; text-align: center; height: 22px;\">RED<\/td>\n<td style=\"width: 50%; text-align: center; height: 22px;\">11<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u3001\u8272\u306e\u6307\u5b9a\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u4e0a\u8a18\u306b\u8a18\u8f09\u3057\u305f\u8272\u306f\u30d7\u30ea\u30bb\u30c3\u30c8\u3067\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3092\u5217\u6319\u3044\u305f\u3057\u307e\u3057\u305f\u304c\u3001\u5341\u516d\u9032\u6570\u3067\u306f\u69d8\u3005\u306a\u8272\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u81ea\u5206\u306e\u597d\u307f\u306e\u8272\u3092\u305c\u3072\u8a2d\u5b9a\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<p>\u3059\u3079\u3066\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u30b3\u30d4\u30fc\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u306b\u8cbc\u308a\u4ed8\u3051\u308b\u3053\u3068\u3067\u305d\u306e\u307e\u307e\u5229\u7528\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p class=\"typesquare_tags\">\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u306e\u958b\u304d\u65b9\u306f\u300e<a href=\"https:\/\/for-dummies.net\/gas-noobs\/how-to-open-script-editor-for-gas\/\">3\u7a2e\u985e\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u306e\u958b\u304d\u65b9<\/a>\u300f\u3092\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u305c\u3072\u3054\u81ea\u8eab\u3067\u3082\u6319\u52d5\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GAS\u7528\u8272\u6307\u5b9a\u30b3\u30fc\u30c9 &#8212; Color \u4eca\u56de\u306f\u30e1\u30bd\u30c3\u30c9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u8272\u6307\u5b9a\u7528\u306e\u5c02\u7528\u30b3\u30fc\u30c9\u306e\u3054\u7d39\u4ecb\u3092\u3057\u307e\u3059\u3002 \u30ab\u30ec\u30f3\u30c0\u30fc\u30a2\u30d7\u30ea\u3067\u306f\u3001\u8272\u306e\u6307\u5b9a\u65b9\u6cd5\u306b\u306f2\u7a2e\u985e\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u3084\u308a\u65b9\u3068\u66f8\u304d\u65b9\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u7c21 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":41,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","spay_email":"","jetpack_publicize_message":"\u3010GAS\u3011CalendarApp\u7528\u306e\u8272\u6307\u5b9a\u7528\u30b3\u30fc\u30c9\u3092\u5b8c\u5168\u30de\u30b9\u30bf\u30fc\r\n#GAS\r\n#GoogleAppsScript\r\n#CalendarApp.Color\r\n#CalendarApp.EventColor","jetpack_is_tweetstorm":false},"categories":[4],"tags":[66,53,51,52,55,50,54],"jetpack_featured_media_url":"https:\/\/i1.wp.com\/for-dummies.net\/gas-noobs\/wp-content\/uploads\/2018\/06\/calendar.png?fit=96%2C96&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9Z92k-9U","jetpack_likes_enabled":true,"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts\/614"}],"collection":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/comments?post=614"}],"version-history":[{"count":7,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts\/614\/revisions"}],"predecessor-version":[{"id":2209,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts\/614\/revisions\/2209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/media\/41"}],"wp:attachment":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/media?parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/categories?post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/tags?post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}