atome 0.5.7.0.3 → 0.3191
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of atome might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/README.md +5 -77
- data/Rakefile +7 -502
- data/app_builder_helpers/Rakefile +235 -0
- data/documentation/framework/enhance_atome.md +1 -1
- data/documentation/installation/atome_server.md +1 -66
- data/documentation/tutorials/tutorials.md +0 -7
- data/exe/atome +157 -819
- data/lib/atome/atome_native_extensions.rb +3 -0
- data/lib/atome/extensions/geolocation.rb +1 -1
- data/lib/atome/extensions/ping.rb +11 -10
- data/lib/atome/extensions/sha.rb +6 -8
- data/lib/atome/kernel/atome_genesis.rb +93 -0
- data/lib/atome/kernel/generators/shapes.rb +7 -0
- data/lib/atome/kernel/properties/geometry.rb +120 -0
- data/lib/atome/kernel/universe.rb +24 -295
- data/lib/atome/renderers/headless/headless.rb +0 -0
- data/lib/atome/renderers/headless/properties/generator.rb +0 -0
- data/lib/atome/renderers/opal/atome_opal_extensions.rb +4 -0
- data/lib/{platform_specific → atome/renderers}/opal/extensions/geolocation.rb +1 -1
- data/lib/atome/renderers/opal/extensions/ping.rb +13 -0
- data/lib/atome/renderers/opal/extensions/sha.rb +11 -0
- data/lib/atome/renderers/opal/opal_browser.rb +8 -0
- data/lib/{platform_specific → atome/renderers}/opal/opal_parser.rb +0 -1
- data/lib/atome/renderers/opal/properties/generator.rb +6 -0
- data/lib/atome/renderers/server/server.rb +0 -0
- data/lib/atome/version.rb +1 -2
- data/lib/atome.rb +16 -35
- data/sig/atome.rbs +0 -75
- data/vendor/assets/Guardfile +4 -0
- data/vendor/assets/Rakefile +2 -12
- data/vendor/assets/application/index.rb +2 -7
- data/vendor/assets/build/css/style.css +53 -0
- data/vendor/assets/build/index.html +24 -0
- data/vendor/assets/build/js/application.js +0 -0
- data/vendor/assets/build/js/third_parties/interact.min.js +4 -0
- data/vendor/assets/build/js/third_parties/popmotion.min.js +1 -0
- data/vendor/assets/examples/misc.rb +219 -0
- data/vendor/assets/examples/ping.rb +3 -0
- data/vendor/assets/examples/storage.rb +9 -0
- data/vendor/assets/examples/view_example.rb +21 -0
- data/vendor/assets/server/atome_server.rb +96 -33
- data/vendor/assets/server/config.ru +3 -8
- metadata +69 -512
- data/CHANGELOG.md +0 -21
- data/atome.gemspec +0 -100
- data/documentation/basic.md +0 -241
- data/documentation/deep learning/architecture.txt +0 -3763
- data/documentation/deep learning/atome.png +0 -0
- data/documentation/deep learning/basic_infos.txt +0 -289
- data/documentation/deep learning/example_of_users_code.rb +0 -1810
- data/documentation/deep learning/misc.txt +0 -24
- data/documentation/deep learning/ruby_js_example.rb +0 -272
- data/documentation/deep learning/wasm_script_help.text +0 -14
- data/documentation/installation/buiding_atome.md +0 -307
- data/lib/atome/atome.rb +0 -131
- data/lib/atome/extensions/atome.rb +0 -705
- data/lib/atome/extensions/mathematics.rb +0 -20
- data/lib/atome/genesis/atomes.rb +0 -109
- data/lib/atome/genesis/genesis.rb +0 -272
- data/lib/atome/genesis/particles/atome.rb +0 -4
- data/lib/atome/genesis/particles/communication.rb +0 -43
- data/lib/atome/genesis/particles/effect.rb +0 -14
- data/lib/atome/genesis/particles/event.rb +0 -344
- data/lib/atome/genesis/particles/geometry.rb +0 -31
- data/lib/atome/genesis/particles/hierarchy.rb +0 -105
- data/lib/atome/genesis/particles/identity.rb +0 -82
- data/lib/atome/genesis/particles/material.rb +0 -119
- data/lib/atome/genesis/particles/property.rb +0 -147
- data/lib/atome/genesis/particles/security.rb +0 -77
- data/lib/atome/genesis/particles/spatial.rb +0 -98
- data/lib/atome/genesis/particles/time.rb +0 -4
- data/lib/atome/genesis/particles/utility.rb +0 -261
- data/lib/atome/genesis/presets.rb +0 -10
- data/lib/atome/genesis/sparkle.rb +0 -217
- data/lib/atome/kernel/black_matter.rb +0 -22
- data/lib/atome/presets/atome.rb +0 -79
- data/lib/atome/utilities/color_helper/color/cmyk.rb +0 -263
- data/lib/atome/utilities/color_helper/color/css.rb +0 -7
- data/lib/atome/utilities/color_helper/color/grayscale.rb +0 -197
- data/lib/atome/utilities/color_helper/color/hsl.rb +0 -240
- data/lib/atome/utilities/color_helper/color/palette/adobecolor.rb +0 -260
- data/lib/atome/utilities/color_helper/color/palette/gimp.rb +0 -104
- data/lib/atome/utilities/color_helper/color/palette/monocontrast.rb +0 -164
- data/lib/atome/utilities/color_helper/color/palette.rb +0 -4
- data/lib/atome/utilities/color_helper/color/rgb/colors.rb +0 -167
- data/lib/atome/utilities/color_helper/color/rgb/contrast.rb +0 -57
- data/lib/atome/utilities/color_helper/color/rgb/metallic.rb +0 -28
- data/lib/atome/utilities/color_helper/color/rgb.rb +0 -715
- data/lib/atome/utilities/color_helper/color/yiq.rb +0 -62
- data/lib/atome/utilities/color_helper/color.rb +0 -415
- data/lib/atome/utilities/essentials.rb +0 -70
- data/lib/atome/utilities/sanitizer.rb +0 -13
- data/lib/atome/utilities/security.rb +0 -71
- data/lib/atome/utilities/utilities.rb +0 -656
- data/lib/atome_relative.rb +0 -39
- data/lib/molecules/_deprecated_examples/site.rb +0 -34
- data/lib/molecules/init.rb +0 -31
- data/lib/molecules/intuition/_deprecated_inputs.rb +0 -111
- data/lib/molecules/intuition/_deprecated_toolbox.rb +0 -282
- data/lib/molecules/intuition/utillities.rb +0 -408
- data/lib/platform_specific/opal/atome_opal_extensions.rb +0 -11
- data/lib/platform_specific/opal/extensions/color.rb +0 -30
- data/lib/platform_specific/opal/extensions/js.rb +0 -20
- data/lib/platform_specific/opal/extensions/object.rb +0 -6
- data/lib/platform_specific/opal/extensions/ping.rb +0 -31
- data/lib/platform_specific/opal/extensions/sha.rb +0 -25
- data/lib/platform_specific/opal/opal.rb +0 -5
- data/lib/platform_specific/wasm/atome_wasm_extensions.rb +0 -11
- data/lib/renderers/headless/headless.rb +0 -18
- data/lib/renderers/headless/index.rb +0 -6
- data/lib/renderers/headless/index_relative.rb +0 -6
- data/lib/renderers/headless/utility.rb +0 -6
- data/lib/renderers/html/atome.rb +0 -2
- data/lib/renderers/html/atome_html.rb +0 -22
- data/lib/renderers/html/communication.rb +0 -3
- data/lib/renderers/html/effect.rb +0 -51
- data/lib/renderers/html/event.rb +0 -59
- data/lib/renderers/html/geometry.rb +0 -49
- data/lib/renderers/html/hierarchy.rb +0 -248
- data/lib/renderers/html/html.rb +0 -1688
- data/lib/renderers/html/identity.rb +0 -104
- data/lib/renderers/html/index.rb +0 -19
- data/lib/renderers/html/index_relative.rb +0 -20
- data/lib/renderers/html/material.rb +0 -88
- data/lib/renderers/html/property.rb +0 -52
- data/lib/renderers/html/security.rb +0 -1
- data/lib/renderers/html/spatial.rb +0 -75
- data/lib/renderers/html/time.rb +0 -1
- data/lib/renderers/html/utility.rb +0 -170
- data/lib/renderers/renderer.rb +0 -16
- data/lib/renderers/server/index.rb +0 -4
- data/lib/renderers/server/index_relative.rb +0 -4
- data/lib/renderers/server/utility.rb +0 -4
- data/sig/atome_js.rbs +0 -1
- data/sig/batch.rbs +0 -7
- data/sig/browser_helper.rbs +0 -14
- data/sig/essentials.rbs +0 -11
- data/sig/genesis.rbs +0 -3
- data/sig/global_variables.rbs +0 -1
- data/sig/matrix.rbs +0 -5
- data/sig/object.rbs +0 -7
- data/sig/universe.rbs +0 -3
- data/src/utilities/host_mode.rb +0 -5
- data/vendor/assets/application/examples/affect.rb +0 -8
- data/vendor/assets/application/examples/aid.rb +0 -10
- data/vendor/assets/application/examples/allow_copy.rb +0 -13
- data/vendor/assets/application/examples/allow_system_right_click.rb +0 -16
- data/vendor/assets/application/examples/alternate.rb +0 -36
- data/vendor/assets/application/examples/animation.rb +0 -91
- data/vendor/assets/application/examples/apply.rb +0 -8
- data/vendor/assets/application/examples/atome.rb +0 -5
- data/vendor/assets/application/examples/atome_particle_validation.rb +0 -7
- data/vendor/assets/application/examples/atome_sparkle_use.rb +0 -6
- data/vendor/assets/application/examples/atomizer.rb +0 -86
- data/vendor/assets/application/examples/attach.rb +0 -34
- data/vendor/assets/application/examples/attached.rb +0 -45
- data/vendor/assets/application/examples/b64_to_image.rb +0 -9
- data/vendor/assets/application/examples/basic_understanding.rb +0 -54
- data/vendor/assets/application/examples/behavior.rb +0 -32
- data/vendor/assets/application/examples/blur.rb +0 -26
- data/vendor/assets/application/examples/border.rb +0 -75
- data/vendor/assets/application/examples/browse.rb +0 -17
- data/vendor/assets/application/examples/categories.rb +0 -5
- data/vendor/assets/application/examples/category.rb +0 -16
- data/vendor/assets/application/examples/center.rb +0 -7
- data/vendor/assets/application/examples/clear.rb +0 -96
- data/vendor/assets/application/examples/clones&monitoring.rb +0 -105
- data/vendor/assets/application/examples/code.rb +0 -13
- data/vendor/assets/application/examples/color.rb +0 -54
- data/vendor/assets/application/examples/compute.rb +0 -16
- data/vendor/assets/application/examples/console.rb +0 -4
- data/vendor/assets/application/examples/convert.rb +0 -163
- data/vendor/assets/application/examples/copy.rb +0 -25
- data/vendor/assets/application/examples/copybck.rb +0 -68
- data/vendor/assets/application/examples/css.rb +0 -6
- data/vendor/assets/application/examples/database_handling.rb +0 -39
- data/vendor/assets/application/examples/debug.rb +0 -78
- data/vendor/assets/application/examples/delete.rb +0 -105
- data/vendor/assets/application/examples/dig.rb +0 -13
- data/vendor/assets/application/examples/display.rb +0 -279
- data/vendor/assets/application/examples/display_bck.rb +0 -164
- data/vendor/assets/application/examples/drag.rb +0 -54
- data/vendor/assets/application/examples/drop.rb +0 -35
- data/vendor/assets/application/examples/duplicate.rb +0 -70
- data/vendor/assets/application/examples/edit.rb +0 -24
- data/vendor/assets/application/examples/encode.rb +0 -6
- data/vendor/assets/application/examples/encrypt.rb +0 -6
- data/vendor/assets/application/examples/example.rb +0 -27
- data/vendor/assets/application/examples/executor.rb +0 -36
- data/vendor/assets/application/examples/file.rb +0 -16
- data/vendor/assets/application/examples/fill.rb +0 -23
- data/vendor/assets/application/examples/find.rb +0 -158
- data/vendor/assets/application/examples/fit.rb +0 -26
- data/vendor/assets/application/examples/fonts.rb +0 -15
- data/vendor/assets/application/examples/generator_and_build.rb +0 -15
- data/vendor/assets/application/examples/getter.rb +0 -16
- data/vendor/assets/application/examples/grab.rb +0 -14
- data/vendor/assets/application/examples/gradient.rb +0 -40
- data/vendor/assets/application/examples/group.rb +0 -44
- data/vendor/assets/application/examples/help.rb +0 -17
- data/vendor/assets/application/examples/hierarchy.rb +0 -21
- data/vendor/assets/application/examples/history.rb +0 -32
- data/vendor/assets/application/examples/holder.rb +0 -62
- data/vendor/assets/application/examples/hypertext.rb +0 -113
- data/vendor/assets/application/examples/image.rb +0 -5
- data/vendor/assets/application/examples/import.rb +0 -33
- data/vendor/assets/application/examples/increment.rb +0 -23
- data/vendor/assets/application/examples/infos.rb +0 -10
- data/vendor/assets/application/examples/input.rb +0 -34
- data/vendor/assets/application/examples/int8.rb +0 -17
- data/vendor/assets/application/examples/js&ruby.rb +0 -18
- data/vendor/assets/application/examples/keyboard.rb +0 -59
- data/vendor/assets/application/examples/layout.rb +0 -38
- data/vendor/assets/application/examples/list.rb +0 -72
- data/vendor/assets/application/examples/localstorage.rb +0 -19
- data/vendor/assets/application/examples/login.rb +0 -84
- data/vendor/assets/application/examples/markup.rb +0 -4
- data/vendor/assets/application/examples/match.rb +0 -115
- data/vendor/assets/application/examples/matrix.rb +0 -118
- data/vendor/assets/application/examples/monitor.rb +0 -14
- data/vendor/assets/application/examples/on_resize.rb +0 -7
- data/vendor/assets/application/examples/on_the_fly_ruby_code_loading.rb +0 -9
- data/vendor/assets/application/examples/online.rb +0 -3
- data/vendor/assets/application/examples/opacity.rb +0 -9
- data/vendor/assets/application/examples/over.rb +0 -29
- data/vendor/assets/application/examples/paint.rb +0 -29
- data/vendor/assets/application/examples/particles.rb +0 -4
- data/vendor/assets/application/examples/percent_to_px.rb +0 -4
- data/vendor/assets/application/examples/play.rb +0 -50
- data/vendor/assets/application/examples/preset.rb +0 -33
- data/vendor/assets/application/examples/random.rb +0 -42
- data/vendor/assets/application/examples/raw_html.rb +0 -48
- data/vendor/assets/application/examples/read.rb +0 -13
- data/vendor/assets/application/examples/recorder.rb +0 -74
- data/vendor/assets/application/examples/refresh.rb +0 -62
- data/vendor/assets/application/examples/remove.rb +0 -60
- data/vendor/assets/application/examples/repeat.rb +0 -26
- data/vendor/assets/application/examples/resize.rb +0 -17
- data/vendor/assets/application/examples/scroll.rb +0 -11
- data/vendor/assets/application/examples/security.rb +0 -76
- data/vendor/assets/application/examples/select_text.rb +0 -18
- data/vendor/assets/application/examples/selected.rb +0 -35
- data/vendor/assets/application/examples/server.rb +0 -24
- data/vendor/assets/application/examples/shadow.rb +0 -60
- data/vendor/assets/application/examples/shapes.rb +0 -6
- data/vendor/assets/application/examples/shortcut.rb +0 -25
- data/vendor/assets/application/examples/site.rb +0 -41
- data/vendor/assets/application/examples/size.rb +0 -17
- data/vendor/assets/application/examples/sliders.rb +0 -17
- data/vendor/assets/application/examples/smooth.rb +0 -9
- data/vendor/assets/application/examples/style.rb +0 -4
- data/vendor/assets/application/examples/sub_atome_manipulation.rb +0 -20
- data/vendor/assets/application/examples/svg_img_to_vector.rb +0 -6
- data/vendor/assets/application/examples/svg_vectorizer.rb +0 -21
- data/vendor/assets/application/examples/sync.rb +0 -38
- data/vendor/assets/application/examples/table.rb +0 -76
- data/vendor/assets/application/examples/tagged.rb +0 -24
- data/vendor/assets/application/examples/terminal.rb +0 -4
- data/vendor/assets/application/examples/test.rb +0 -584
- data/vendor/assets/application/examples/text.rb +0 -5
- data/vendor/assets/application/examples/tick.rb +0 -29
- data/vendor/assets/application/examples/tools.rb +0 -666
- data/vendor/assets/application/examples/touch.rb +0 -41
- data/vendor/assets/application/examples/type_mutation.rb +0 -18
- data/vendor/assets/application/examples/unit.rb +0 -14
- data/vendor/assets/application/examples/universe.rb +0 -8
- data/vendor/assets/application/examples/vector.rb +0 -37
- data/vendor/assets/application/examples/video.rb +0 -14
- data/vendor/assets/application/examples/wait.rb +0 -6
- data/vendor/assets/application/examples/www.rb +0 -10
- data/vendor/assets/server/atome_server_wasm.rb +0 -54
- data/vendor/assets/server/capture.rb +0 -10
- data/vendor/assets/server/database.rb +0 -63
- data/vendor/assets/server/eDen.rb +0 -302
- data/vendor/assets/server/extensions.rb +0 -13
- data/vendor/assets/src/css/style.css +0 -167
- data/vendor/assets/src/index.html +0 -45
- data/vendor/assets/src/index_opal.html +0 -40
- data/vendor/assets/src/index_server.html +0 -38
- data/vendor/assets/src/index_server_wasm.html +0 -45
- data/vendor/assets/src/index_wasm.html +0 -50
- data/vendor/assets/src/js/atome/atome.js +0 -506
- data/vendor/assets/src/js/atome/atome_helpers/add_font.js +0 -46
- data/vendor/assets/src/js/atome/atome_helpers/atome_animate.js +0 -65
- data/vendor/assets/src/js/atome/atome_helpers/atome_drag.js +0 -124
- data/vendor/assets/src/js/atome/atome_helpers/atome_drop.js +0 -12
- data/vendor/assets/src/js/atome/atome_helpers/atome_events.js +0 -171
- data/vendor/assets/src/js/atome/atome_helpers/atome_over.js +0 -43
- data/vendor/assets/src/js/atome/atome_helpers/atome_sort.js +0 -20
- data/vendor/assets/src/js/atome/atome_helpers/atome_time.js +0 -10
- data/vendor/assets/src/js/atome/atome_helpers/atome_video.js +0 -12
- data/vendor/assets/src/js/atome/atome_helpers/communication.js +0 -35
- data/vendor/assets/src/js/atome/atome_helpers/file.js +0 -12
- data/vendor/assets/src/js/atome/specific/opal.js +0 -111
- data/vendor/assets/src/js/atome/specific/wasm.js +0 -123
- data/vendor/assets/src/js/molecules/web.js +0 -4
- data/vendor/assets/src/js/third_parties/browser.script.iife.min.js +0 -13
- data/vendor/assets/src/js/third_parties/fabric.min.js +0 -1
- data/vendor/assets/src/js/third_parties/html-to-image.min.js +0 -2
- data/vendor/assets/src/js/third_parties/interact.min.js +0 -3
- data/vendor/assets/src/js/third_parties/jsencrypt.min.js +0 -2
- data/vendor/assets/src/js/third_parties/papaparse.min.js +0 -7
- data/vendor/assets/src/js/third_parties/popmotion.min.js +0 -1
- data/vendor/assets/src/js/third_parties/sortable.min.js +0 -2
- data/vendor/assets/src/js/third_parties/three.min.js +0 -6
- data/vendor/assets/src/js/third_parties/w3color.js +0 -646
- data/vendor/assets/src/js/third_parties/wad.min.js +0 -9
- data/vendor/assets/src/js/third_parties/zim.min.js +0 -1
- data/vendor/assets/src/medias/audios/audio_missing.wav +0 -0
- data/vendor/assets/src/medias/audios/clap.wav +0 -0
- data/vendor/assets/src/medias/audios/cowbell.wav +0 -0
- data/vendor/assets/src/medias/audios/hihat.wav +0 -0
- data/vendor/assets/src/medias/audios/kick.wav +0 -0
- data/vendor/assets/src/medias/audios/riff.m4a +0 -0
- data/vendor/assets/src/medias/audios/snare.wav +0 -0
- data/vendor/assets/src/medias/audios/tom.wav +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +0 -202
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Black.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Bold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Italic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Light.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Medium.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Regular.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-Thin.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/LICENSE.txt +0 -202
- data/vendor/assets/src/medias/fonts/Roboto_Slab/README.txt +0 -71
- data/vendor/assets/src/medias/fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Black.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Bold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraBold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraLight.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Light.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Medium.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Regular.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-SemiBold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Thin.ttf +0 -0
- data/vendor/assets/src/medias/images/atome.svg +0 -12
- data/vendor/assets/src/medias/images/ballanim.png +0 -0
- data/vendor/assets/src/medias/images/blank.png +0 -0
- data/vendor/assets/src/medias/images/green_planet.png +0 -0
- data/vendor/assets/src/medias/images/icons/Lowpass.svg +0 -8
- data/vendor/assets/src/medias/images/icons/activate.svg +0 -3
- data/vendor/assets/src/medias/images/icons/audio.svg +0 -7
- data/vendor/assets/src/medias/images/icons/band_pass.svg +0 -8
- data/vendor/assets/src/medias/images/icons/clear.svg +0 -5
- data/vendor/assets/src/medias/images/icons/color.svg +0 -5
- data/vendor/assets/src/medias/images/icons/copy.svg +0 -8
- data/vendor/assets/src/medias/images/icons/create.svg +0 -3
- data/vendor/assets/src/medias/images/icons/delete.svg +0 -8
- data/vendor/assets/src/medias/images/icons/edit-.svg +0 -4
- data/vendor/assets/src/medias/images/icons/edit.svg +0 -4
- data/vendor/assets/src/medias/images/icons/edition.svg +0 -4
- data/vendor/assets/src/medias/images/icons/email.svg +0 -13
- data/vendor/assets/src/medias/images/icons/equalizer-.svg +0 -5
- data/vendor/assets/src/medias/images/icons/equalizer.svg +0 -5
- data/vendor/assets/src/medias/images/icons/filter.svg +0 -4
- data/vendor/assets/src/medias/images/icons/folder.svg +0 -4
- data/vendor/assets/src/medias/images/icons/group.svg +0 -6
- data/vendor/assets/src/medias/images/icons/hamburger.svg +0 -8
- data/vendor/assets/src/medias/images/icons/high_pass.svg +0 -5
- data/vendor/assets/src/medias/images/icons/link.svg +0 -4
- data/vendor/assets/src/medias/images/icons/load.svg +0 -4
- data/vendor/assets/src/medias/images/icons/low_pass.svg +0 -5
- data/vendor/assets/src/medias/images/icons/mail_gray.svg +0 -6
- data/vendor/assets/src/medias/images/icons/mail_green.svg +0 -6
- data/vendor/assets/src/medias/images/icons/mail_orange.svg +0 -6
- data/vendor/assets/src/medias/images/icons/microphone.svg +0 -7
- data/vendor/assets/src/medias/images/icons/midi_in.svg +0 -4
- data/vendor/assets/src/medias/images/icons/midi_out.svg +0 -4
- data/vendor/assets/src/medias/images/icons/modules.svg +0 -11
- data/vendor/assets/src/medias/images/icons/paste.svg +0 -4
- data/vendor/assets/src/medias/images/icons/pause.svg +0 -5
- data/vendor/assets/src/medias/images/icons/play.svg +0 -7
- data/vendor/assets/src/medias/images/icons/record.svg +0 -4
- data/vendor/assets/src/medias/images/icons/save.svg +0 -5
- data/vendor/assets/src/medias/images/icons/select--.svg +0 -4
- data/vendor/assets/src/medias/images/icons/select-.svg +0 -5
- data/vendor/assets/src/medias/images/icons/select-all.svg +0 -4
- data/vendor/assets/src/medias/images/icons/select.svg +0 -4
- data/vendor/assets/src/medias/images/icons/settings.svg +0 -5
- data/vendor/assets/src/medias/images/icons/settings0.svg +0 -2
- data/vendor/assets/src/medias/images/icons/settings1.svg +0 -17
- data/vendor/assets/src/medias/images/icons/settings2.svg +0 -25
- data/vendor/assets/src/medias/images/icons/settings_old.svg +0 -6
- data/vendor/assets/src/medias/images/icons/shape.svg +0 -7
- data/vendor/assets/src/medias/images/icons/speaker.svg +0 -6
- data/vendor/assets/src/medias/images/icons/stop.svg +0 -4
- data/vendor/assets/src/medias/images/icons/tool.svg +0 -7
- data/vendor/assets/src/medias/images/icons/tools.svg +0 -9
- data/vendor/assets/src/medias/images/icons/undo.svg +0 -4
- data/vendor/assets/src/medias/images/icons/undo2.svg +0 -4
- data/vendor/assets/src/medias/images/icons/validate.svg +0 -9
- data/vendor/assets/src/medias/images/icons/vie.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-saw.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-sine.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-square-.svg +0 -4
- data/vendor/assets/src/medias/images/icons/wave-square.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-triangle.svg +0 -3
- data/vendor/assets/src/medias/images/icons/waveform-.svg +0 -4
- data/vendor/assets/src/medias/images/icons/waveform.svg +0 -7
- data/vendor/assets/src/medias/images/logos/Facebook.svg +0 -8
- data/vendor/assets/src/medias/images/logos/GitHub Black.svg +0 -7
- data/vendor/assets/src/medias/images/logos/GitHub.svg +0 -7
- data/vendor/assets/src/medias/images/logos/LinkedIn-full.svg +0 -109
- data/vendor/assets/src/medias/images/logos/LinkedIn.svg +0 -11
- data/vendor/assets/src/medias/images/logos/Orange/Facebook.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/TikTok.svg +0 -11
- data/vendor/assets/src/medias/images/logos/Orange/Twitter.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/instagram.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/vimeo.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/youtube.svg +0 -7
- data/vendor/assets/src/medias/images/logos/TikTok.svg +0 -11
- data/vendor/assets/src/medias/images/logos/Twitter.svg +0 -35
- data/vendor/assets/src/medias/images/logos/X.svg +0 -5
- data/vendor/assets/src/medias/images/logos/YouTube.svg +0 -1
- data/vendor/assets/src/medias/images/logos/apple.svg +0 -4
- data/vendor/assets/src/medias/images/logos/atome.svg +0 -12
- data/vendor/assets/src/medias/images/logos/freebsd.png +0 -0
- data/vendor/assets/src/medias/images/logos/freebsd.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/Facebook.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/TikTok.svg +0 -11
- data/vendor/assets/src/medias/images/logos/gray/Twitter.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/instagram.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/vimeo.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/youtube.svg +0 -7
- data/vendor/assets/src/medias/images/logos/gray/youtube2.svg +0 -13
- data/vendor/assets/src/medias/images/logos/instagram.svg +0 -6
- data/vendor/assets/src/medias/images/logos/tiktok_back.svg +0 -1
- data/vendor/assets/src/medias/images/logos/vimeo.svg +0 -17
- data/vendor/assets/src/medias/images/noise.svg +0 -17
- data/vendor/assets/src/medias/images/red_planet.png +0 -0
- data/vendor/assets/src/medias/images/tile.png +0 -0
- data/vendor/assets/src/medias/texts/lorem.txt +0 -1
- data/vendor/assets/src/medias/utils/infos/color.rb +0 -29
- data/vendor/assets/src/medias/utils/infos/width.rb +0 -25
- data/vendor/assets/src/medias/videos/video_missing.mp4 +0 -0
- data/vendor/assets/src-tauri/.gitignore +0 -4
- data/vendor/assets/src-tauri/Cargo.toml +0 -27
- data/vendor/assets/src-tauri/build.rs +0 -3
- data/vendor/assets/src-tauri/icons/128x128.png +0 -0
- data/vendor/assets/src-tauri/icons/128x128@2x.png +0 -0
- data/vendor/assets/src-tauri/icons/32x32.png +0 -0
- data/vendor/assets/src-tauri/icons/Square107x107Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square142x142Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square150x150Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square284x284Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square30x30Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square310x310Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square44x44Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square71x71Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square89x89Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/StoreLogo.png +0 -0
- data/vendor/assets/src-tauri/icons/icon.icns +0 -0
- data/vendor/assets/src-tauri/icons/icon.ico +0 -0
- data/vendor/assets/src-tauri/icons/icon.png +0 -0
- data/vendor/assets/src-tauri/src/main.rs +0 -71
- data/vendor/assets/src-tauri/tauri.conf.json +0 -70
- data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_arm +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs-osx_x86 +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs-unix +0 -0
- data/vendor/assets/src-wasm/wasm/wasi-vfs.exe +0 -0
- /data/vendor/assets/{src → build}/favicon.ico +0 -0
- /data/vendor/assets/{src/js/third_parties → build/js}/ping.min.js +0 -0
- /data/vendor/assets/{src → build}/js/third_parties/interact.min.js.map +0 -0
- /data/vendor/assets/{src → build}/js/third_parties/sha256.min.js +0 -0
@@ -1,104 +0,0 @@
|
|
1
|
-
require 'color/palette'
|
2
|
-
|
3
|
-
# A class that can read a GIMP (GNU Image Manipulation Program) palette file
|
4
|
-
# and provide a Hash-like interface to the contents. GIMP colour palettes
|
5
|
-
# are RGB values only.
|
6
|
-
#
|
7
|
-
# Because two or more entries in a GIMP palette may have the same name, all
|
8
|
-
# named entries are returned as an array.
|
9
|
-
#
|
10
|
-
# pal = Color::Palette::Gimp.from_file(my_gimp_palette)
|
11
|
-
# pal[0] => Color::RGB<...>
|
12
|
-
# pal["white"] => [ Color::RGB<...> ]
|
13
|
-
# pal["unknown"] => [ Color::RGB<...>, Color::RGB<...>, ... ]
|
14
|
-
#
|
15
|
-
# GIMP Palettes are always indexable by insertion order (an integer key).
|
16
|
-
class Color::Palette::Gimp
|
17
|
-
include Enumerable
|
18
|
-
|
19
|
-
class << self
|
20
|
-
# Create a GIMP palette object from the named file.
|
21
|
-
def from_file(filename)
|
22
|
-
File.open(filename, "rb") { |io| Color::Palette::Gimp.from_io(io) }
|
23
|
-
end
|
24
|
-
|
25
|
-
# Create a GIMP palette object from the provided IO.
|
26
|
-
def from_io(io)
|
27
|
-
Color::Palette::Gimp.new(io.read)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# Create a new GIMP palette from the palette file as a string.
|
32
|
-
def initialize(palette)
|
33
|
-
@colors = []
|
34
|
-
@names = {}
|
35
|
-
@valid = false
|
36
|
-
@name = "(unnamed)"
|
37
|
-
|
38
|
-
palette.split($/).each do |line|
|
39
|
-
line.chomp!
|
40
|
-
line.gsub!(/\s*#.*\Z/, '')
|
41
|
-
|
42
|
-
next if line.empty?
|
43
|
-
|
44
|
-
if line =~ /\AGIMP Palette\Z/
|
45
|
-
@valid = true
|
46
|
-
next
|
47
|
-
end
|
48
|
-
|
49
|
-
info = /(\w+):\s(.*$)/.match(line)
|
50
|
-
if info
|
51
|
-
@name = info.captures[1] if info.captures[0] =~ /name/i
|
52
|
-
next
|
53
|
-
end
|
54
|
-
|
55
|
-
line.gsub!(/^\s+/, '')
|
56
|
-
data = line.split(/\s+/, 4)
|
57
|
-
name = data.pop.strip
|
58
|
-
data.map! { |el| el.to_i }
|
59
|
-
|
60
|
-
color = Color::RGB.new(*data)
|
61
|
-
|
62
|
-
@colors << color
|
63
|
-
@names[name] ||= []
|
64
|
-
@names[name] << color
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
# Provides the colour or colours at the provided selectors.
|
69
|
-
def values_at(*selectors)
|
70
|
-
@colors.values_at(*selectors)
|
71
|
-
end
|
72
|
-
|
73
|
-
# If a Numeric +key+ is provided, the single colour value at that position
|
74
|
-
# will be returned. If a String +key+ is provided, the colour set (an
|
75
|
-
# array) for that colour name will be returned.
|
76
|
-
def [](key)
|
77
|
-
if key.kind_of?(Numeric)
|
78
|
-
@colors[key]
|
79
|
-
else
|
80
|
-
@names[key]
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# Loops through each colour.
|
85
|
-
def each
|
86
|
-
@colors.each { |el| yield el }
|
87
|
-
end
|
88
|
-
|
89
|
-
# Loops through each named colour set.
|
90
|
-
def each_name #:yields color_name, color_set:#
|
91
|
-
@names.each { |color_name, color_set| yield color_name, color_set }
|
92
|
-
end
|
93
|
-
|
94
|
-
# Returns true if this is believed to be a valid GIMP palette.
|
95
|
-
def valid?
|
96
|
-
@valid
|
97
|
-
end
|
98
|
-
|
99
|
-
def size
|
100
|
-
@colors.size
|
101
|
-
end
|
102
|
-
|
103
|
-
attr_reader :name
|
104
|
-
end
|
@@ -1,164 +0,0 @@
|
|
1
|
-
require 'color/palette'
|
2
|
-
|
3
|
-
# Generates a monochromatic constrasting colour palette for background and
|
4
|
-
# foreground. What does this mean?
|
5
|
-
#
|
6
|
-
# Monochromatic: A single colour is used to generate the base palette, and
|
7
|
-
# this colour is lightened five times and darkened five times to provide
|
8
|
-
# eleven distinct colours.
|
9
|
-
#
|
10
|
-
# Contrasting: The foreground is also generated as a monochromatic colour
|
11
|
-
# palette; however, all generated colours are tested to see that they are
|
12
|
-
# appropriately contrasting to ensure maximum readability of the foreground
|
13
|
-
# against the background.
|
14
|
-
class Color::Palette::MonoContrast
|
15
|
-
# Hash of CSS background colour values.
|
16
|
-
#
|
17
|
-
# This is always 11 values:
|
18
|
-
#
|
19
|
-
# 0:: The starting colour.
|
20
|
-
# +1..+5:: Lighter colours.
|
21
|
-
# -1..-5:: Darker colours.
|
22
|
-
attr_reader :background
|
23
|
-
# Hash of CSS foreground colour values.
|
24
|
-
#
|
25
|
-
# This is always 11 values:
|
26
|
-
#
|
27
|
-
# 0:: The starting colour.
|
28
|
-
# +1..+5:: Lighter colours.
|
29
|
-
# -1..-5:: Darker colours.
|
30
|
-
attr_reader :foreground
|
31
|
-
|
32
|
-
DEFAULT_MINIMUM_BRIGHTNESS_DIFF = (125.0 / 255.0)
|
33
|
-
|
34
|
-
# The minimum brightness difference between the background and the
|
35
|
-
# foreground, and must be between 0..1. Setting this value will regenerate
|
36
|
-
# the palette based on the base colours. The default value for this is 125
|
37
|
-
# / 255.0. If this value is set to +nil+, it will be restored to the
|
38
|
-
# default.
|
39
|
-
attr_reader :minimum_brightness_diff
|
40
|
-
def minimum_brightness_diff=(bd) #:nodoc:
|
41
|
-
@minimum_brightness_diff = if bd.nil?
|
42
|
-
DEFAULT_MINIMUM_BRIGHTNESS_DIFF
|
43
|
-
elsif bd > 1.0
|
44
|
-
1.0
|
45
|
-
elsif bd < 0.0
|
46
|
-
0.0
|
47
|
-
else
|
48
|
-
bd
|
49
|
-
end
|
50
|
-
regenerate(@background[0], @foreground[0])
|
51
|
-
end
|
52
|
-
|
53
|
-
DEFAULT_MINIMUM_COLOR_DIFF = (500.0 / 255.0)
|
54
|
-
|
55
|
-
# The minimum colour difference between the background and the foreground,
|
56
|
-
# and must be between 0..3. Setting this value will regenerate the palette
|
57
|
-
# based on the base colours. The default value for this is 500 / 255.0.
|
58
|
-
attr_reader :minimum_color_diff
|
59
|
-
def minimum_color_diff=(cd) #:nodoc:
|
60
|
-
@minimum_color_diff = if cd.nil?
|
61
|
-
DEFAULT_MINIMUM_COLOR_DIFF
|
62
|
-
elsif cd > 3.0
|
63
|
-
3.0
|
64
|
-
elsif cd < 0.0
|
65
|
-
0.0
|
66
|
-
else
|
67
|
-
cd
|
68
|
-
end
|
69
|
-
regenerate(@background[0], @foreground[0])
|
70
|
-
end
|
71
|
-
|
72
|
-
# Generate the initial palette.
|
73
|
-
def initialize(background, foreground = nil)
|
74
|
-
@minimum_brightness_diff = DEFAULT_MINIMUM_BRIGHTNESS_DIFF
|
75
|
-
@minimum_color_diff = DEFAULT_MINIMUM_COLOR_DIFF
|
76
|
-
regenerate(background, foreground)
|
77
|
-
end
|
78
|
-
|
79
|
-
# Generate the colour palettes.
|
80
|
-
def regenerate(background, foreground = nil)
|
81
|
-
foreground ||= background
|
82
|
-
background = background.to_rgb
|
83
|
-
foreground = foreground.to_rgb
|
84
|
-
|
85
|
-
@background = {}
|
86
|
-
@foreground = {}
|
87
|
-
|
88
|
-
@background[-5] = background.darken_by(10)
|
89
|
-
@background[-4] = background.darken_by(25)
|
90
|
-
@background[-3] = background.darken_by(50)
|
91
|
-
@background[-2] = background.darken_by(75)
|
92
|
-
@background[-1] = background.darken_by(85)
|
93
|
-
@background[ 0] = background
|
94
|
-
@background[+1] = background.lighten_by(85)
|
95
|
-
@background[+2] = background.lighten_by(75)
|
96
|
-
@background[+3] = background.lighten_by(50)
|
97
|
-
@background[+4] = background.lighten_by(25)
|
98
|
-
@background[+5] = background.lighten_by(10)
|
99
|
-
|
100
|
-
@foreground[-5] = calculate_foreground(@background[-5], foreground)
|
101
|
-
@foreground[-4] = calculate_foreground(@background[-4], foreground)
|
102
|
-
@foreground[-3] = calculate_foreground(@background[-3], foreground)
|
103
|
-
@foreground[-2] = calculate_foreground(@background[-2], foreground)
|
104
|
-
@foreground[-1] = calculate_foreground(@background[-1], foreground)
|
105
|
-
@foreground[ 0] = calculate_foreground(@background[ 0], foreground)
|
106
|
-
@foreground[+1] = calculate_foreground(@background[+1], foreground)
|
107
|
-
@foreground[+2] = calculate_foreground(@background[+2], foreground)
|
108
|
-
@foreground[+3] = calculate_foreground(@background[+3], foreground)
|
109
|
-
@foreground[+4] = calculate_foreground(@background[+4], foreground)
|
110
|
-
@foreground[+5] = calculate_foreground(@background[+5], foreground)
|
111
|
-
end
|
112
|
-
|
113
|
-
# Given a background colour and a foreground colour, modifies the
|
114
|
-
# foreground colour so that it will have enough contrast to be seen
|
115
|
-
# against the background colour.
|
116
|
-
#
|
117
|
-
# Uses #mininum_brightness_diff and #minimum_color_diff.
|
118
|
-
def calculate_foreground(background, foreground)
|
119
|
-
nfg = nil
|
120
|
-
# Loop through brighter and darker versions of the foreground color. The
|
121
|
-
# numbers here represent the amount of foreground color to mix with
|
122
|
-
# black and white.
|
123
|
-
[100, 75, 50, 25, 0].each do |percent|
|
124
|
-
dfg = foreground.darken_by(percent)
|
125
|
-
lfg = foreground.lighten_by(percent)
|
126
|
-
|
127
|
-
dbd = brightness_diff(background, dfg)
|
128
|
-
lbd = brightness_diff(background, lfg)
|
129
|
-
|
130
|
-
if lbd > dbd
|
131
|
-
nfg = lfg
|
132
|
-
nbd = lbd
|
133
|
-
else
|
134
|
-
nfg = dfg
|
135
|
-
nbd = dbd
|
136
|
-
end
|
137
|
-
|
138
|
-
ncd = color_diff(background, nfg)
|
139
|
-
|
140
|
-
break if nbd >= @minimum_brightness_diff and ncd >= @minimum_color_diff
|
141
|
-
end
|
142
|
-
nfg
|
143
|
-
end
|
144
|
-
|
145
|
-
# Returns the absolute difference between the brightness levels of two
|
146
|
-
# colours. This will be a decimal value between 0 and 1. W3C accessibility
|
147
|
-
# guidelines for {colour contrast}[http://www.w3.org/TR/AERT#color-contrast]
|
148
|
-
# suggest that this value be at least approximately 0.49 (125 / 255.0) for
|
149
|
-
# proper contrast.
|
150
|
-
def brightness_diff(c1, c2)
|
151
|
-
(c1.brightness - c2.brightness).abs
|
152
|
-
end
|
153
|
-
|
154
|
-
# Returns the contrast between to colours, a decimal value between 0 and
|
155
|
-
# 3. W3C accessibility guidelines for {colour
|
156
|
-
# contrast}[http://www.w3.org/TR/AERT#color-contrast] suggest that this
|
157
|
-
# value be at least approximately 1.96 (500 / 255.0) for proper contrast.
|
158
|
-
def color_diff(c1, c2)
|
159
|
-
r = (c1.r - c2.r).abs
|
160
|
-
g = (c1.g - c2.g).abs
|
161
|
-
b = (c1.b - c2.b).abs
|
162
|
-
r + g + b
|
163
|
-
end
|
164
|
-
end
|
@@ -1,167 +0,0 @@
|
|
1
|
-
class Color::RGB
|
2
|
-
class << self
|
3
|
-
private
|
4
|
-
def named(rgb, *names)
|
5
|
-
__named_color(self, new(*rgb), *names)
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
named [0xf0, 0xf8, 0xff], :AliceBlue
|
10
|
-
named [0xfa, 0xeb, 0xd7], :AntiqueWhite
|
11
|
-
named [0x00, 0xff, 0xff], :Aqua
|
12
|
-
named [0x7f, 0xff, 0xd4], :Aquamarine
|
13
|
-
named [0xf0, 0xff, 0xff], :Azure
|
14
|
-
named [0xf5, 0xf5, 0xdc], :Beige
|
15
|
-
named [0xff, 0xe4, 0xc4], :Bisque
|
16
|
-
named [0x66, 0x33, 0x99], :RebeccaPurple, :BeccaPurple
|
17
|
-
named [0x00, 0x00, 0x00], :Black
|
18
|
-
named [0xff, 0xeb, 0xcd], :BlanchedAlmond
|
19
|
-
named [0x00, 0x00, 0xff], :Blue
|
20
|
-
named [0x8a, 0x2b, 0xe2], :BlueViolet
|
21
|
-
named [0xa5, 0x2a, 0x2a], :Brown
|
22
|
-
named [0xde, 0xb8, 0x87], :BurlyWood, :Burlywood
|
23
|
-
named [0x5f, 0x9e, 0xa0], :CadetBlue
|
24
|
-
named [0xff, 0x5e, 0xd0], :Carnation
|
25
|
-
named [0x8d, 0x00, 0x00], :Cayenne
|
26
|
-
named [0x7f, 0xff, 0x00], :Chartreuse
|
27
|
-
named [0xd2, 0x69, 0x1e], :Chocolate
|
28
|
-
named [0xff, 0x7f, 0x50], :Coral
|
29
|
-
named [0x64, 0x95, 0xed], :CornflowerBlue
|
30
|
-
named [0xff, 0xf8, 0xdc], :Cornsilk
|
31
|
-
named [0xdc, 0x14, 0x3c], :Crimson
|
32
|
-
named [0x00, 0xff, 0xff], :Cyan
|
33
|
-
named [0x00, 0x00, 0x8b], :DarkBlue
|
34
|
-
named [0x00, 0x8b, 0x8b], :DarkCyan
|
35
|
-
named [0xb8, 0x86, 0x0b], :DarkGoldenRod, :DarkGoldenrod
|
36
|
-
named [0xa9, 0xa9, 0xa9], :DarkGray, :DarkGrey
|
37
|
-
named [0x00, 0x64, 0x00], :DarkGreen
|
38
|
-
named [0xbd, 0xb7, 0x6b], :DarkKhaki
|
39
|
-
named [0x8b, 0x00, 0x8b], :DarkMagenta
|
40
|
-
named [0x55, 0x6b, 0x2f], :DarkOliveGreen, :DarkoliveGreen
|
41
|
-
named [0xff, 0x8c, 0x00], :DarkOrange
|
42
|
-
named [0x99, 0x32, 0xcc], :DarkOrchid
|
43
|
-
named [0x8b, 0x00, 0x00], :DarkRed
|
44
|
-
named [0xe9, 0x96, 0x7a], :DarkSalmon, :Darksalmon
|
45
|
-
named [0x8f, 0xbc, 0x8f], :DarkSeaGreen
|
46
|
-
named [0x48, 0x3d, 0x8b], :DarkSlateBlue
|
47
|
-
named [0x2f, 0x4f, 0x4f], :DarkSlateGray, :DarkSlateGrey
|
48
|
-
named [0x00, 0xce, 0xd1], :DarkTurquoise
|
49
|
-
named [0x94, 0x00, 0xd3], :DarkViolet
|
50
|
-
named [0xff, 0x8c, 0x00], :Darkorange
|
51
|
-
named [0xff, 0x14, 0x93], :DeepPink
|
52
|
-
named [0x00, 0xbf, 0xbf], :DeepSkyBlue
|
53
|
-
named [0x69, 0x69, 0x69], :DimGray, :DimGrey
|
54
|
-
named [0x1e, 0x90, 0xff], :DodgerBlue
|
55
|
-
named [0xd1, 0x92, 0x75], :Feldspar
|
56
|
-
named [0xb2, 0x22, 0x22], :FireBrick, :Firebrick
|
57
|
-
named [0xff, 0xfa, 0xf0], :FloralWhite
|
58
|
-
named [0x22, 0x8b, 0x22], :ForestGreen
|
59
|
-
named [0xff, 0x00, 0xff], :Fuchsia
|
60
|
-
named [0xdc, 0xdc, 0xdc], :Gainsboro
|
61
|
-
named [0xf8, 0xf8, 0xff], :GhostWhite
|
62
|
-
named [0xff, 0xd7, 0x00], :Gold
|
63
|
-
named [0xda, 0xa5, 0x20], :GoldenRod, :Goldenrod
|
64
|
-
named [0x80, 0x80, 0x80], :Gray, :Grey
|
65
|
-
named [10, 10, 10, 100.0], :Gray10, :Grey10
|
66
|
-
named [20, 20, 20, 100.0], :Gray20, :Grey20
|
67
|
-
named [30, 30, 30, 100.0], :Gray30, :Grey30
|
68
|
-
named [40, 40, 40, 100.0], :Gray40, :Grey40
|
69
|
-
named [50, 50, 50, 100.0], :Gray50, :Grey50
|
70
|
-
named [60, 60, 60, 100.0], :Gray60, :Grey60
|
71
|
-
named [70, 70, 70, 100.0], :Gray70, :Grey70
|
72
|
-
named [80, 80, 80, 100.0], :Gray80, :Grey80
|
73
|
-
named [90, 90, 90, 100.0], :Gray90, :Grey90
|
74
|
-
named [0x00, 0x80, 0x00], :Green
|
75
|
-
named [0xad, 0xff, 0x2f], :GreenYellow
|
76
|
-
named [0xf0, 0xff, 0xf0], :HoneyDew, :Honeydew
|
77
|
-
named [0xff, 0x69, 0xb4], :HotPink
|
78
|
-
named [0xcd, 0x5c, 0x5c], :IndianRed
|
79
|
-
named [0x4b, 0x00, 0x82], :Indigo
|
80
|
-
named [0xff, 0xff, 0xf0], :Ivory
|
81
|
-
named [0xf0, 0xe6, 0x8c], :Khaki
|
82
|
-
named [0xe6, 0xe6, 0xfa], :Lavender
|
83
|
-
named [0xff, 0xf0, 0xf5], :LavenderBlush
|
84
|
-
named [0x7c, 0xfc, 0x00], :LawnGreen
|
85
|
-
named [0xff, 0xfa, 0xcd], :LemonChiffon
|
86
|
-
named [0xad, 0xd8, 0xe6], :LightBlue
|
87
|
-
named [0xf0, 0x80, 0x80], :LightCoral
|
88
|
-
named [0xe0, 0xff, 0xff], :LightCyan
|
89
|
-
named [0xfa, 0xfa, 0xd2], :LightGoldenRodYellow, :LightGoldenrodYellow
|
90
|
-
named [0xd3, 0xd3, 0xd3], :LightGray, :LightGrey
|
91
|
-
named [0x90, 0xee, 0x90], :LightGreen
|
92
|
-
named [0xff, 0xb6, 0xc1], :LightPink
|
93
|
-
named [0xff, 0xa0, 0x7a], :LightSalmon, :Lightsalmon
|
94
|
-
named [0x20, 0xb2, 0xaa], :LightSeaGreen
|
95
|
-
named [0x87, 0xce, 0xfa], :LightSkyBlue
|
96
|
-
named [0x84, 0x70, 0xff], :LightSlateBlue
|
97
|
-
named [0x77, 0x88, 0x99], :LightSlateGray, :LightSlateGrey
|
98
|
-
named [0xb0, 0xc4, 0xde], :LightSteelBlue, :LightsteelBlue
|
99
|
-
named [0xff, 0xff, 0xe0], :LightYellow
|
100
|
-
named [0x00, 0xff, 0x00], :Lime
|
101
|
-
named [0x32, 0xcd, 0x32], :LimeGreen
|
102
|
-
named [0xfa, 0xf0, 0xe6], :Linen
|
103
|
-
named [0xff, 0x00, 0xff], :Magenta
|
104
|
-
named [0x80, 0x00, 0x00], :Maroon
|
105
|
-
named [0x66, 0xcd, 0xaa], :MediumAquaMarine, :MediumAquamarine
|
106
|
-
named [0x00, 0x00, 0xcd], :MediumBlue
|
107
|
-
named [0xba, 0x55, 0xd3], :MediumOrchid
|
108
|
-
named [0x93, 0x70, 0xdb], :MediumPurple
|
109
|
-
named [0x3c, 0xb3, 0x71], :MediumSeaGreen
|
110
|
-
named [0x7b, 0x68, 0xee], :MediumSlateBlue
|
111
|
-
named [0x00, 0xfa, 0x9a], :MediumSpringGreen
|
112
|
-
named [0x48, 0xd1, 0xcc], :MediumTurquoise
|
113
|
-
named [0xc7, 0x15, 0x85], :MediumVioletRed
|
114
|
-
named [0x19, 0x19, 0x70], :MidnightBlue
|
115
|
-
named [0xf5, 0xff, 0xfa], :MintCream
|
116
|
-
named [0xff, 0xe4, 0xe1], :MistyRose
|
117
|
-
named [0xff, 0xe4, 0xb5], :Moccasin
|
118
|
-
named [0xff, 0xde, 0xad], :NavajoWhite
|
119
|
-
named [0x00, 0x00, 0x80], :Navy
|
120
|
-
named [0xfd, 0xf5, 0xe6], :OldLace
|
121
|
-
named [0x80, 0x80, 0x00], :Olive
|
122
|
-
named [0x6b, 0x8e, 0x23], :OliveDrab, :Olivedrab
|
123
|
-
named [0xff, 0xa5, 0x00], :Orange
|
124
|
-
named [0xff, 0x45, 0x00], :OrangeRed
|
125
|
-
named [0xda, 0x70, 0xd6], :Orchid
|
126
|
-
named [0xee, 0xe8, 0xaa], :PaleGoldenRod, :PaleGoldenrod
|
127
|
-
named [0x98, 0xfb, 0x98], :PaleGreen
|
128
|
-
named [0xaf, 0xee, 0xee], :PaleTurquoise
|
129
|
-
named [0xdb, 0x70, 0x93], :PaleVioletRed
|
130
|
-
named [0xff, 0xef, 0xd5], :PapayaWhip
|
131
|
-
named [0xff, 0xda, 0xb9], :PeachPuff, :Peachpuff
|
132
|
-
named [0xcd, 0x85, 0x3f], :Peru
|
133
|
-
named [0xff, 0xc0, 0xcb], :Pink
|
134
|
-
named [0xdd, 0xa0, 0xdd], :Plum
|
135
|
-
named [0xb0, 0xe0, 0xe6], :PowderBlue
|
136
|
-
named [0x80, 0x00, 0x80], :Purple
|
137
|
-
named [0xff, 0x00, 0x00], :Red
|
138
|
-
named [0xbc, 0x8f, 0x8f], :RosyBrown
|
139
|
-
named [0x41, 0x69, 0xe1], :RoyalBlue
|
140
|
-
named [0x8b, 0x45, 0x13], :SaddleBrown
|
141
|
-
named [0xfa, 0x80, 0x72], :Salmon
|
142
|
-
named [0xf4, 0xa4, 0x60], :SandyBrown
|
143
|
-
named [0x2e, 0x8b, 0x57], :SeaGreen
|
144
|
-
named [0xff, 0xf5, 0xee], :SeaShell, :Seashell
|
145
|
-
named [0xa0, 0x52, 0x2d], :Sienna
|
146
|
-
named [0xc0, 0xc0, 0xc0], :Silver
|
147
|
-
named [0x87, 0xce, 0xeb], :SkyBlue
|
148
|
-
named [0x6a, 0x5a, 0xcd], :SlateBlue
|
149
|
-
named [0x70, 0x80, 0x90], :SlateGray, :SlateGrey
|
150
|
-
named [0xff, 0xfa, 0xfa], :Snow
|
151
|
-
named [0x00, 0xff, 0x7f], :SpringGreen
|
152
|
-
named [0x46, 0x82, 0xb4], :SteelBlue
|
153
|
-
named [0xd2, 0xb4, 0x8c], :Tan
|
154
|
-
named [0x00, 0x80, 0x80], :Teal
|
155
|
-
named [0xd8, 0xbf, 0xd8], :Thistle
|
156
|
-
named [0xff, 0x63, 0x47], :Tomato
|
157
|
-
named [0x40, 0xe0, 0xd0], :Turquoise
|
158
|
-
named [0xee, 0x82, 0xee], :Violet
|
159
|
-
named [0xd0, 0x20, 0x90], :VioletRed
|
160
|
-
named [0xf5, 0xde, 0xb3], :Wheat
|
161
|
-
named [0xff, 0xff, 0xff], :White
|
162
|
-
named [0xf5, 0xf5, 0xf5], :WhiteSmoke
|
163
|
-
named [0xff, 0xff, 0x00], :Yellow
|
164
|
-
named [0x9a, 0xcd, 0x32], :YellowGreen
|
165
|
-
end
|
166
|
-
|
167
|
-
require_relative 'metallic'
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# -*- ruby encoding: utf-8 -*-
|
2
|
-
|
3
|
-
class Color::RGB
|
4
|
-
# Outputs how much contrast this color has with another RGB color.
|
5
|
-
# Computes the same regardless of which one is considered foreground. If
|
6
|
-
# the other color does not have a #to_rgb method, this will throw an
|
7
|
-
# exception. Anything over about 0.22 should have a high likelihood of
|
8
|
-
# being legible, but the larger the difference, the more contrast.
|
9
|
-
# Otherwise, to be safe go with something > 0.3
|
10
|
-
def contrast(other)
|
11
|
-
other = coerce(other)
|
12
|
-
|
13
|
-
# The following numbers have been set with some care.
|
14
|
-
((diff_brightness(other) * 0.65) +
|
15
|
-
(diff_hue(other) * 0.20) +
|
16
|
-
(diff_luminosity(other) * 0.15))
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
# Provides the luminosity difference between two rbg vals
|
21
|
-
def diff_luminosity(other)
|
22
|
-
other = coerce(other)
|
23
|
-
l1 = (0.2126 * (other.r) ** 2.2) +
|
24
|
-
(0.7152 * (other.b) ** 2.2) +
|
25
|
-
(0.0722 * (other.g) ** 2.2);
|
26
|
-
|
27
|
-
l2 = (0.2126 * (self.r) ** 2.2) +
|
28
|
-
(0.7152 * (self.b) ** 2.2) +
|
29
|
-
(0.0722 * (self.g) ** 2.2);
|
30
|
-
|
31
|
-
((([l1, l2].max) + 0.05) / ( ([l1, l2].min) + 0.05 ) - 1) / 20.0
|
32
|
-
end
|
33
|
-
|
34
|
-
# Provides the brightness difference.
|
35
|
-
def diff_brightness(other)
|
36
|
-
other = other.to_rgb
|
37
|
-
br1 = (299 * other.r + 587 * other.g + 114 * other.b)
|
38
|
-
br2 = (299 * self.r + 587 * self.g + 114 * self.b)
|
39
|
-
(br1 - br2).abs / 1000.0;
|
40
|
-
end
|
41
|
-
|
42
|
-
# Provides the euclidean distance between the two color values
|
43
|
-
def diff_euclidean(other)
|
44
|
-
other = other.to_rgb
|
45
|
-
((((other.r - self.r) ** 2) +
|
46
|
-
((other.g - self.g) ** 2) +
|
47
|
-
((other.b - self.b) ** 2)) ** 0.5) / 1.7320508075688772
|
48
|
-
end
|
49
|
-
|
50
|
-
# Difference in the two colors' hue
|
51
|
-
def diff_hue(other)
|
52
|
-
other = other.to_rgb
|
53
|
-
((self.r - other.r).abs +
|
54
|
-
(self.g - other.g).abs +
|
55
|
-
(self.b - other.b).abs) / 3
|
56
|
-
end
|
57
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# -*- ruby encoding: utf-8 -*-
|
2
|
-
|
3
|
-
class Color::RGB
|
4
|
-
# This namespace contains some RGB metallic colours suggested by Jim
|
5
|
-
# Freeze.
|
6
|
-
module Metallic; end
|
7
|
-
|
8
|
-
class << self
|
9
|
-
private
|
10
|
-
def metallic(rgb, *names)
|
11
|
-
__named_color(Metallic, new(*rgb), *names)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
metallic [0x99, 0x99, 0x99], :Aluminum
|
16
|
-
metallic [0xd9, 0x87, 0x19], :CoolCopper
|
17
|
-
metallic [0xb8, 0x73, 0x33], :Copper
|
18
|
-
metallic [0x4c, 0x4c, 0x4c], :Iron
|
19
|
-
metallic [0x19, 0x19, 0x19], :Lead
|
20
|
-
metallic [0xb3, 0xb3, 0xb3], :Magnesium
|
21
|
-
metallic [0xe6, 0xe6, 0xe6], :Mercury
|
22
|
-
metallic [0x80, 0x80, 0x80], :Nickel
|
23
|
-
metallic [0x60, 0x00, 0x00], :PolySilicon, :Poly
|
24
|
-
metallic [0xcc, 0xcc, 0xcc], :Silver
|
25
|
-
metallic [0x66, 0x66, 0x66], :Steel
|
26
|
-
metallic [0x7f, 0x7f, 0x7f], :Tin
|
27
|
-
metallic [0x33, 0x33, 0x33], :Tungsten
|
28
|
-
end
|