├── LICENSE ├── README.md ├── addon_config.mk ├── example-simpleExample ├── Makefile ├── Project.xcconfig ├── addons.make ├── config.make ├── example_simpleExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── example_simpleExample.xccheckout │ │ └── xcuserdata │ │ │ └── felix.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcshareddata │ │ └── xcschemes │ │ │ ├── example_simpleExample Debug.xcscheme │ │ │ └── example_simpleExample Release.xcscheme │ └── xcuserdata │ │ └── felix.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── images └── example-colorPalette.png ├── ofxaddons_thumbnail.png └── src ├── ofxColorPalette.cpp └── ofxColorPalette.h /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 aspeteRakete 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ofxColorPalette 2 | =============== 3 | 4 | openFrameworks addon for algorithmic generated color palettes. The ofxColorPalette is templated, so ofColor corresponds to ofxColorPalette, ofShortColor to ofxShortColorPalette and ofFloatColor to ofxFloatColorPalette. 5 | 6 | Use Triads and Complement to create tension. Use Monochrome and Analogue to radiate a sense of calm. Don't use Random! It hurts my eyes! 7 | 8 | ![](images/example-colorPalette.png) 9 | -------------------------------------------------------------------------------- /addon_config.mk: -------------------------------------------------------------------------------- 1 | # All variables and this file are optional, if they are not present the PG and the 2 | # makefiles will try to parse the correct values from the file system. 3 | # 4 | # Variables that specify exclusions can use % as a wildcard to specify that anything in 5 | # that position will match. A partial path can also be specified to, for example, exclude 6 | # a whole folder from the parsed paths from the file system 7 | # 8 | # Variables can be specified using = or += 9 | # = will clear the contents of that variable both specified from the file or the ones parsed 10 | # from the file system 11 | # += will add the values to the previous ones in the file or the ones parsed from the file 12 | # system 13 | # 14 | # The PG can be used to detect errors in this file, just create a new project with this addon 15 | # and the PG will write to the console the kind of error and in which line it is 16 | 17 | meta: 18 | ADDON_NAME = ofxColorPalette 19 | ADDON_DESCRIPTION = Addon for generating Color Palettes with Algorithms 20 | ADDON_AUTHOR = aspeteRakete 21 | ADDON_TAGS = "color" "palette" "algorithmic" 22 | ADDON_URL = http://github.com/aspeteRakete/ofxColorPalette 23 | 24 | common: 25 | # dependencies with other addons, a list of them separated by spaces 26 | # or use += in several lines 27 | # ADDON_DEPENDENCIES = 28 | 29 | # include search paths, this will be usually parsed from the file system 30 | # but if the addon or addon libraries need special search paths they can be 31 | # specified here separated by spaces or one per line using += 32 | # ADDON_INCLUDES = 33 | 34 | # any special flag that should be passed to the compiler when using this 35 | # addon 36 | # ADDON_CFLAGS = 37 | 38 | # any special flag that should be passed to the linker when using this 39 | # addon, also used for system libraries with -lname 40 | # ADDON_LDFLAGS = 41 | 42 | # linux only, any library that should be included in the project using 43 | # pkg-config 44 | # ADDON_PKG_CONFIG_LIBRARIES = 45 | 46 | # osx/iOS only, any framework that should be included in the project 47 | # ADDON_FRAMEWORKS = 48 | 49 | # source files, these will be usually parsed from the file system looking 50 | # in the src folders in libs and the root of the addon. if your addon needs 51 | # to include files in different places or a different set of files per platform 52 | # they can be specified here 53 | # ADDON_SOURCES = 54 | 55 | # some addons need resources to be copied to the bin/data folder of the project 56 | # specify here any files that need to be copied, you can use wildcards like * and ? 57 | # ADDON_DATA = 58 | 59 | # when parsing the file system looking for libraries exclude this for all or 60 | # a specific platform 61 | # ADDON_LIBS_EXCLUDE = 62 | 63 | linux64: 64 | # binary libraries, these will be usually parsed from the file system but some 65 | # libraries need to passed to the linker in a specific order 66 | ADDON_LIBS = 67 | linux: 68 | ADDON_LIBS = 69 | win_cb: 70 | ADDON_LIBS = 71 | linuxarmv6l: 72 | ADDON_LIBS = 73 | linuxarmv7l: 74 | ADDON_LIBS = 75 | android/armeabi: 76 | ADDON_LIBS = 77 | -------------------------------------------------------------------------------- /example-simpleExample/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=../../.. 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /example-simpleExample/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) 17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 18 | -------------------------------------------------------------------------------- /example-simpleExample/addons.make: -------------------------------------------------------------------------------- 1 | ofxColorPalette 2 | -------------------------------------------------------------------------------- /example-simpleExample/config.make: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # CONFIGURE PROJECT MAKEFILE (optional) 3 | # This file is where we make project specific configurations. 4 | ################################################################################ 5 | 6 | ################################################################################ 7 | # OF ROOT 8 | # The location of your root openFrameworks installation 9 | # (default) OF_ROOT = ../../.. 10 | ################################################################################ 11 | # OF_ROOT = ../../.. 12 | 13 | ################################################################################ 14 | # PROJECT ROOT 15 | # The location of the project - a starting place for searching for files 16 | # (default) PROJECT_ROOT = . (this directory) 17 | # 18 | ################################################################################ 19 | # PROJECT_ROOT = . 20 | 21 | ################################################################################ 22 | # PROJECT SPECIFIC CHECKS 23 | # This is a project defined section to create internal makefile flags to 24 | # conditionally enable or disable the addition of various features within 25 | # this makefile. For instance, if you want to make changes based on whether 26 | # GTK is installed, one might test that here and create a variable to check. 27 | ################################################################################ 28 | # None 29 | 30 | ################################################################################ 31 | # PROJECT EXTERNAL SOURCE PATHS 32 | # These are fully qualified paths that are not within the PROJECT_ROOT folder. 33 | # Like source folders in the PROJECT_ROOT, these paths are subject to 34 | # exlclusion via the PROJECT_EXLCUSIONS list. 35 | # 36 | # (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) 37 | # 38 | # Note: Leave a leading space when adding list items with the += operator 39 | ################################################################################ 40 | # PROJECT_EXTERNAL_SOURCE_PATHS = 41 | 42 | ################################################################################ 43 | # PROJECT EXCLUSIONS 44 | # These makefiles assume that all folders in your current project directory 45 | # and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations 46 | # to look for source code. The any folders or files that match any of the 47 | # items in the PROJECT_EXCLUSIONS list below will be ignored. 48 | # 49 | # Each item in the PROJECT_EXCLUSIONS list will be treated as a complete 50 | # string unless teh user adds a wildcard (%) operator to match subdirectories. 51 | # GNU make only allows one wildcard for matching. The second wildcard (%) is 52 | # treated literally. 53 | # 54 | # (default) PROJECT_EXCLUSIONS = (blank) 55 | # 56 | # Will automatically exclude the following: 57 | # 58 | # $(PROJECT_ROOT)/bin% 59 | # $(PROJECT_ROOT)/obj% 60 | # $(PROJECT_ROOT)/%.xcodeproj 61 | # 62 | # Note: Leave a leading space when adding list items with the += operator 63 | ################################################################################ 64 | # PROJECT_EXCLUSIONS = 65 | 66 | ################################################################################ 67 | # PROJECT LINKER FLAGS 68 | # These flags will be sent to the linker when compiling the executable. 69 | # 70 | # (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs 71 | # 72 | # Note: Leave a leading space when adding list items with the += operator 73 | ################################################################################ 74 | 75 | # Currently, shared libraries that are needed are copied to the 76 | # $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to 77 | # add a runtime path to search for those shared libraries, since they aren't 78 | # incorporated directly into the final executable application binary. 79 | # TODO: should this be a default setting? 80 | # PROJECT_LDFLAGS=-Wl,-rpath=./libs 81 | 82 | ################################################################################ 83 | # PROJECT DEFINES 84 | # Create a space-delimited list of DEFINES. The list will be converted into 85 | # CFLAGS with the "-D" flag later in the makefile. 86 | # 87 | # (default) PROJECT_DEFINES = (blank) 88 | # 89 | # Note: Leave a leading space when adding list items with the += operator 90 | ################################################################################ 91 | # PROJECT_DEFINES = 92 | 93 | ################################################################################ 94 | # PROJECT CFLAGS 95 | # This is a list of fully qualified CFLAGS required when compiling for this 96 | # project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS 97 | # defined in your platform specific core configuration files. These flags are 98 | # presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. 99 | # 100 | # (default) PROJECT_CFLAGS = (blank) 101 | # 102 | # Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in 103 | # your platform specific configuration file will be applied by default and 104 | # further flags here may not be needed. 105 | # 106 | # Note: Leave a leading space when adding list items with the += operator 107 | ################################################################################ 108 | # PROJECT_CFLAGS = 109 | 110 | ################################################################################ 111 | # PROJECT OPTIMIZATION CFLAGS 112 | # These are lists of CFLAGS that are target-specific. While any flags could 113 | # be conditionally added, they are usually limited to optimization flags. 114 | # These flags are added BEFORE the PROJECT_CFLAGS. 115 | # 116 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. 117 | # 118 | # (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) 119 | # 120 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. 121 | # 122 | # (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) 123 | # 124 | # Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the 125 | # PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration 126 | # file will be applied by default and further optimization flags here may not 127 | # be needed. 128 | # 129 | # Note: Leave a leading space when adding list items with the += operator 130 | ################################################################################ 131 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE = 132 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG = 133 | 134 | ################################################################################ 135 | # PROJECT COMPILERS 136 | # Custom compilers can be set for CC and CXX 137 | # (default) PROJECT_CXX = (blank) 138 | # (default) PROJECT_CC = (blank) 139 | # Note: Leave a leading space when adding list items with the += operator 140 | ################################################################################ 141 | # PROJECT_CXX = 142 | # PROJECT_CC = 143 | -------------------------------------------------------------------------------- /example-simpleExample/example_simpleExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 208330A0A93D54E1B72C8A3E /* ofxColorPalette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0AA32A6E85840B27AB020C1 /* ofxColorPalette.cpp */; }; 11 | BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; 12 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; }; 13 | E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; 14 | E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; 15 | E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; 16 | E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; 17 | E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; 18 | E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; 19 | E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; 20 | E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; 21 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; 22 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; 23 | E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; 24 | E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; 25 | E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; 26 | E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; 27 | E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */; }; 28 | E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E715D3B6510020DFD4 /* QTKit.framework */; }; 29 | E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7F985F515E0DE99003869B5 /* Accelerate.framework */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 36 | proxyType = 2; 37 | remoteGlobalIDString = E4B27C1510CBEB8E00536013; 38 | remoteInfo = openFrameworks; 39 | }; 40 | E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 43 | proxyType = 1; 44 | remoteGlobalIDString = E4B27C1410CBEB8E00536013; 45 | remoteInfo = openFrameworks; 46 | }; 47 | /* End PBXContainerItemProxy section */ 48 | 49 | /* Begin PBXCopyFilesBuildPhase section */ 50 | E4C2427710CC5ABF004149E2 /* CopyFiles */ = { 51 | isa = PBXCopyFilesBuildPhase; 52 | buildActionMask = 2147483647; 53 | dstPath = ""; 54 | dstSubfolderSpec = 10; 55 | files = ( 56 | BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */, 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXCopyFilesBuildPhase section */ 61 | 62 | /* Begin PBXFileReference section */ 63 | 9ADE112845E38CA604AC94E8 /* ofxColorPalette.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxColorPalette.h; path = ../../../addons/ofxColorPalette/src/ofxColorPalette.h; sourceTree = SOURCE_ROOT; }; 64 | BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = ""; }; 65 | C0AA32A6E85840B27AB020C1 /* ofxColorPalette.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxColorPalette.cpp; path = ../../../addons/ofxColorPalette/src/ofxColorPalette.cpp; sourceTree = SOURCE_ROOT; }; 66 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 67 | E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = ""; }; 68 | E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; 69 | E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; 70 | E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; 71 | E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 72 | E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; 73 | E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 74 | E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 75 | E4B69B5B0A3A1756003C02F2 /* example_simpleExampleDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example_simpleExampleDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; 76 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; 77 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; 78 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; 79 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; 80 | E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 81 | E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 82 | E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 83 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; 84 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; 85 | E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; 86 | E7E077E715D3B6510020DFD4 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 87 | E7F985F515E0DE99003869B5 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = ""; }; 88 | /* End PBXFileReference section */ 89 | 90 | /* Begin PBXFrameworksBuildPhase section */ 91 | E4B69B590A3A1756003C02F2 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */, 96 | E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */, 97 | E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */, 98 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */, 99 | E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, 100 | E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, 101 | E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, 102 | E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, 103 | E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, 104 | E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, 105 | E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, 106 | E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, 107 | E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, 108 | E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, 109 | E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, 110 | E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */, 111 | ); 112 | runOnlyForDeploymentPostprocessing = 0; 113 | }; 114 | /* End PBXFrameworksBuildPhase section */ 115 | 116 | /* Begin PBXGroup section */ 117 | ADD30217DA6E9945E447F8A3 /* ofxColorPalette */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | C49EA96EDAD87F08FC79C1C7 /* src */, 121 | ); 122 | name = ofxColorPalette; 123 | sourceTree = ""; 124 | }; 125 | BB4B014C10F69532006C3DED /* addons */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | ADD30217DA6E9945E447F8A3 /* ofxColorPalette */, 129 | ); 130 | name = addons; 131 | sourceTree = ""; 132 | }; 133 | BBAB23C913894ECA00AA2426 /* system frameworks */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | E7F985F515E0DE99003869B5 /* Accelerate.framework */, 137 | E4C2424410CC5A17004149E2 /* AppKit.framework */, 138 | E4C2424510CC5A17004149E2 /* Cocoa.framework */, 139 | E4C2424610CC5A17004149E2 /* IOKit.framework */, 140 | E45BE9710E8CC7DD009D7055 /* AGL.framework */, 141 | E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, 142 | E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, 143 | E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, 144 | E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, 145 | E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, 146 | E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, 147 | E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, 148 | E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */, 149 | E7E077E715D3B6510020DFD4 /* QTKit.framework */, 150 | ); 151 | name = "system frameworks"; 152 | sourceTree = ""; 153 | }; 154 | BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | BBAB23BE13894E4700AA2426 /* GLUT.framework */, 158 | ); 159 | name = "3rd party frameworks"; 160 | sourceTree = ""; 161 | }; 162 | C49EA96EDAD87F08FC79C1C7 /* src */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | C0AA32A6E85840B27AB020C1 /* ofxColorPalette.cpp */, 166 | 9ADE112845E38CA604AC94E8 /* ofxColorPalette.h */, 167 | ); 168 | name = src; 169 | sourceTree = ""; 170 | }; 171 | E4328144138ABC890047C5CB /* Products */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */, 175 | ); 176 | name = Products; 177 | sourceTree = ""; 178 | }; 179 | E45BE5980E8CC70C009D7055 /* frameworks */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */, 183 | BBAB23C913894ECA00AA2426 /* system frameworks */, 184 | ); 185 | name = frameworks; 186 | sourceTree = ""; 187 | }; 188 | E4B69B4A0A3A1720003C02F2 = { 189 | isa = PBXGroup; 190 | children = ( 191 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, 192 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */, 193 | E4B69E1C0A3A1BDC003C02F2 /* src */, 194 | E4EEC9E9138DF44700A80321 /* openFrameworks */, 195 | BB4B014C10F69532006C3DED /* addons */, 196 | E45BE5980E8CC70C009D7055 /* frameworks */, 197 | E4B69B5B0A3A1756003C02F2 /* example_simpleExampleDebug.app */, 198 | ); 199 | sourceTree = ""; 200 | }; 201 | E4B69E1C0A3A1BDC003C02F2 /* src */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, 205 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, 206 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */, 207 | ); 208 | path = src; 209 | sourceTree = SOURCE_ROOT; 210 | }; 211 | E4EEC9E9138DF44700A80321 /* openFrameworks */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */, 215 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */, 216 | ); 217 | name = openFrameworks; 218 | sourceTree = ""; 219 | }; 220 | /* End PBXGroup section */ 221 | 222 | /* Begin PBXNativeTarget section */ 223 | E4B69B5A0A3A1756003C02F2 /* example_simpleExample */ = { 224 | isa = PBXNativeTarget; 225 | buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example_simpleExample" */; 226 | buildPhases = ( 227 | E4B69B580A3A1756003C02F2 /* Sources */, 228 | E4B69B590A3A1756003C02F2 /* Frameworks */, 229 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, 230 | E4C2427710CC5ABF004149E2 /* CopyFiles */, 231 | ); 232 | buildRules = ( 233 | ); 234 | dependencies = ( 235 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */, 236 | ); 237 | name = example_simpleExample; 238 | productName = myOFApp; 239 | productReference = E4B69B5B0A3A1756003C02F2 /* example_simpleExampleDebug.app */; 240 | productType = "com.apple.product-type.application"; 241 | }; 242 | /* End PBXNativeTarget section */ 243 | 244 | /* Begin PBXProject section */ 245 | E4B69B4C0A3A1720003C02F2 /* Project object */ = { 246 | isa = PBXProject; 247 | attributes = { 248 | LastUpgradeCheck = 0460; 249 | }; 250 | buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example_simpleExample" */; 251 | compatibilityVersion = "Xcode 3.2"; 252 | developmentRegion = English; 253 | hasScannedForEncodings = 0; 254 | knownRegions = ( 255 | English, 256 | Japanese, 257 | French, 258 | German, 259 | ); 260 | mainGroup = E4B69B4A0A3A1720003C02F2; 261 | productRefGroup = E4B69B4A0A3A1720003C02F2; 262 | projectDirPath = ""; 263 | projectReferences = ( 264 | { 265 | ProductGroup = E4328144138ABC890047C5CB /* Products */; 266 | ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 267 | }, 268 | ); 269 | projectRoot = ""; 270 | targets = ( 271 | E4B69B5A0A3A1756003C02F2 /* example_simpleExample */, 272 | ); 273 | }; 274 | /* End PBXProject section */ 275 | 276 | /* Begin PBXReferenceProxy section */ 277 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = { 278 | isa = PBXReferenceProxy; 279 | fileType = archive.ar; 280 | path = openFrameworksDebug.a; 281 | remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */; 282 | sourceTree = BUILT_PRODUCTS_DIR; 283 | }; 284 | /* End PBXReferenceProxy section */ 285 | 286 | /* Begin PBXShellScriptBuildPhase section */ 287 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { 288 | isa = PBXShellScriptBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | ); 292 | inputPaths = ( 293 | ); 294 | outputPaths = ( 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | shellPath = /bin/sh; 298 | shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"; install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";\nmkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\ncp -f \"$ICON_FILE\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\n"; 299 | }; 300 | /* End PBXShellScriptBuildPhase section */ 301 | 302 | /* Begin PBXSourcesBuildPhase section */ 303 | E4B69B580A3A1756003C02F2 /* Sources */ = { 304 | isa = PBXSourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, 308 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 309 | 208330A0A93D54E1B72C8A3E /* ofxColorPalette.cpp in Sources */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | /* End PBXSourcesBuildPhase section */ 314 | 315 | /* Begin PBXTargetDependency section */ 316 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = { 317 | isa = PBXTargetDependency; 318 | name = openFrameworks; 319 | targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */; 320 | }; 321 | /* End PBXTargetDependency section */ 322 | 323 | /* Begin XCBuildConfiguration section */ 324 | E4B69B4E0A3A1720003C02F2 /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 327 | buildSettings = { 328 | ARCHS = "$(NATIVE_ARCH)"; 329 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 330 | COPY_PHASE_STRIP = NO; 331 | DEAD_CODE_STRIPPING = YES; 332 | GCC_AUTO_VECTORIZATION = YES; 333 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 334 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 335 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 336 | GCC_OPTIMIZATION_LEVEL = 0; 337 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 338 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 339 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 340 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 341 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 342 | GCC_WARN_UNUSED_VALUE = NO; 343 | GCC_WARN_UNUSED_VARIABLE = NO; 344 | HEADER_SEARCH_PATHS = ( 345 | "$(OF_CORE_HEADERS)", 346 | ../../../addons/ofxColorPalette/libs, 347 | ../../../addons/ofxColorPalette/src, 348 | ); 349 | MACOSX_DEPLOYMENT_TARGET = 10.6; 350 | OTHER_CPLUSPLUSFLAGS = ( 351 | "-D__MACOSX_CORE__", 352 | "-lpthread", 353 | "-mtune=native", 354 | ); 355 | SDKROOT = macosx; 356 | }; 357 | name = Debug; 358 | }; 359 | E4B69B4F0A3A1720003C02F2 /* Release */ = { 360 | isa = XCBuildConfiguration; 361 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 362 | buildSettings = { 363 | ARCHS = "$(NATIVE_ARCH)"; 364 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 365 | COPY_PHASE_STRIP = YES; 366 | DEAD_CODE_STRIPPING = YES; 367 | GCC_AUTO_VECTORIZATION = YES; 368 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 369 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 370 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 371 | GCC_OPTIMIZATION_LEVEL = 3; 372 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 373 | GCC_UNROLL_LOOPS = YES; 374 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 375 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 376 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 377 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 378 | GCC_WARN_UNUSED_VALUE = NO; 379 | GCC_WARN_UNUSED_VARIABLE = NO; 380 | HEADER_SEARCH_PATHS = ( 381 | "$(OF_CORE_HEADERS)", 382 | ../../../addons/ofxColorPalette/libs, 383 | ../../../addons/ofxColorPalette/src, 384 | ); 385 | MACOSX_DEPLOYMENT_TARGET = 10.6; 386 | OTHER_CPLUSPLUSFLAGS = ( 387 | "-D__MACOSX_CORE__", 388 | "-lpthread", 389 | "-mtune=native", 390 | ); 391 | SDKROOT = macosx; 392 | }; 393 | name = Release; 394 | }; 395 | E4B69B600A3A1757003C02F2 /* Debug */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | COMBINE_HIDPI_IMAGES = YES; 399 | COPY_PHASE_STRIP = NO; 400 | FRAMEWORK_SEARCH_PATHS = ( 401 | "$(inherited)", 402 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 403 | ); 404 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 405 | GCC_DYNAMIC_NO_PIC = NO; 406 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 407 | GCC_MODEL_TUNING = NONE; 408 | ICON = "$(ICON_NAME_DEBUG)"; 409 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 410 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 411 | INSTALL_PATH = "$(HOME)/Applications"; 412 | LIBRARY_SEARCH_PATHS = ( 413 | "$(inherited)", 414 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 415 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 416 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 417 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", 418 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", 419 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", 420 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 421 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 422 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 423 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 424 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 425 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 426 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 427 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", 428 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", 429 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 430 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 431 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 432 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 433 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 434 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 435 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 436 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 437 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 438 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", 439 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", 440 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", 441 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", 442 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", 443 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", 444 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", 445 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", 446 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", 447 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", 448 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", 449 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", 450 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", 451 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", 452 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", 453 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", 454 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", 455 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", 456 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", 457 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", 458 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", 459 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", 460 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", 461 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", 462 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", 463 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", 464 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", 465 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", 466 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", 467 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", 468 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", 469 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", 470 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", 471 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", 472 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", 473 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", 474 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_52)", 475 | ); 476 | PRODUCT_NAME = "$(TARGET_NAME)Debug"; 477 | WRAPPER_EXTENSION = app; 478 | }; 479 | name = Debug; 480 | }; 481 | E4B69B610A3A1757003C02F2 /* Release */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | COMBINE_HIDPI_IMAGES = YES; 485 | COPY_PHASE_STRIP = YES; 486 | FRAMEWORK_SEARCH_PATHS = ( 487 | "$(inherited)", 488 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 489 | ); 490 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 491 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 492 | GCC_MODEL_TUNING = NONE; 493 | ICON = "$(ICON_NAME_RELEASE)"; 494 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 495 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 496 | INSTALL_PATH = "$(HOME)/Applications"; 497 | LIBRARY_SEARCH_PATHS = ( 498 | "$(inherited)", 499 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 500 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 501 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 502 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", 503 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", 504 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", 505 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 506 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 507 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 508 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 509 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 510 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 511 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 512 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", 513 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", 514 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 515 | "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 516 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 517 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 518 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 519 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 520 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 521 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 522 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 523 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 524 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", 525 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", 526 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", 527 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", 528 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", 529 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", 530 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", 531 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", 532 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", 533 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", 534 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", 535 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", 536 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", 537 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", 538 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", 539 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", 540 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", 541 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", 542 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", 543 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", 544 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", 545 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", 546 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", 547 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", 548 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", 549 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", 550 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", 551 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", 552 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", 553 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", 554 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", 555 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", 556 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", 557 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", 558 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", 559 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", 560 | ); 561 | PRODUCT_NAME = "$(TARGET_NAME)"; 562 | WRAPPER_EXTENSION = app; 563 | }; 564 | name = Release; 565 | }; 566 | /* End XCBuildConfiguration section */ 567 | 568 | /* Begin XCConfigurationList section */ 569 | E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example_simpleExample" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | E4B69B4E0A3A1720003C02F2 /* Debug */, 573 | E4B69B4F0A3A1720003C02F2 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example_simpleExample" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | E4B69B600A3A1757003C02F2 /* Debug */, 582 | E4B69B610A3A1757003C02F2 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | /* End XCConfigurationList section */ 588 | }; 589 | rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; 590 | } 591 | -------------------------------------------------------------------------------- /example-simpleExample/example_simpleExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example-simpleExample/example_simpleExample.xcodeproj/project.xcworkspace/xcshareddata/example_simpleExample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | E99BAF88-1D8D-4627-A9FC-577ECDF9DA54 9 | IDESourceControlProjectName 10 | example_simpleExample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 3E2325D9-386F-4E4F-8715-D45DAE4E0FC7 14 | ssh://github.com/aspeteRakete/ofxColorPalette.git 15 | C47FD595-2A62-4ECE-9599-80D6F69B9764 16 | ssh://github.com/openframeworks/openFrameworks.git 17 | 18 | IDESourceControlProjectPath 19 | addons/ofxColorPalette/example-simpleExample/example_simpleExample.xcodeproj/project.xcworkspace 20 | IDESourceControlProjectRelativeInstallPathDictionary 21 | 22 | 3E2325D9-386F-4E4F-8715-D45DAE4E0FC7 23 | ../../.. 24 | C47FD595-2A62-4ECE-9599-80D6F69B9764 25 | ../../../../.. 26 | 27 | IDESourceControlProjectURL 28 | ssh://github.com/aspeteRakete/ofxColorPalette.git 29 | IDESourceControlProjectVersion 30 | 110 31 | IDESourceControlProjectWCCIdentifier 32 | C47FD595-2A62-4ECE-9599-80D6F69B9764 33 | IDESourceControlProjectWCConfigurations 34 | 35 | 36 | IDESourceControlRepositoryExtensionIdentifierKey 37 | public.vcs.git 38 | IDESourceControlWCCIdentifierKey 39 | 3E2325D9-386F-4E4F-8715-D45DAE4E0FC7 40 | IDESourceControlWCCName 41 | ofxColorPalette 42 | 43 | 44 | IDESourceControlRepositoryExtensionIdentifierKey 45 | public.vcs.git 46 | IDESourceControlWCCIdentifierKey 47 | C47FD595-2A62-4ECE-9599-80D6F69B9764 48 | IDESourceControlWCCName 49 | openFrameworks 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /example-simpleExample/example_simpleExample.xcodeproj/project.xcworkspace/xcuserdata/felix.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/like-a-bause/ofxColorPalette/3ad0e3007bbf135770f9b11b2f5614397d6274da/example-simpleExample/example_simpleExample.xcodeproj/project.xcworkspace/xcuserdata/felix.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /example-simpleExample/example_simpleExample.xcodeproj/xcshareddata/xcschemes/example_simpleExample Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /example-simpleExample/example_simpleExample.xcodeproj/xcshareddata/xcschemes/example_simpleExample Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /example-simpleExample/example_simpleExample.xcodeproj/xcuserdata/felix.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SuppressBuildableAutocreation 6 | 7 | E4B69B5A0A3A1756003C02F2 8 | 9 | primary 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /example-simpleExample/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.ofapp 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | 22 | 23 | -------------------------------------------------------------------------------- /example-simpleExample/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(800,800,OF_WINDOW); // <-------- setup the GL context 7 | 8 | // this kicks off the running of my app 9 | // can be OF_WINDOW or OF_FULLSCREEN 10 | // pass in width and height too: 11 | ofRunApp(new ofApp()); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /example-simpleExample/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | #define NUM_COLOR 9 4 | #define RECT_SIZE 70 5 | #define PADDING 10 6 | //-------------------------------------------------------------- 7 | void ofApp::setup(){ 8 | mode = ofxColorPalette::BRIGHTNESS; 9 | brightness = 200; 10 | saturation = 200; 11 | 12 | } 13 | 14 | //-------------------------------------------------------------- 15 | void ofApp::update(){ 16 | switch (mode) { 17 | case ofxColorPalette::BRIGHTNESS: 18 | brightness = ofMap(ofGetMouseY(), 0, ofGetHeight(), 0, 255); 19 | break; 20 | case ofxColorPalette::SATURATION: 21 | saturation = ofMap(ofGetMouseY(), 0, ofGetHeight(), 0, 255); 22 | break; 23 | default: 24 | break; 25 | }; 26 | 27 | ofColor base = ofColor::fromHsb(ofMap(ofGetMouseX(), 0, ofGetWidth(), 0, 255), saturation, brightness); 28 | 29 | complement.setBaseColor(base); 30 | complementBrightness.setBaseColor(base); 31 | triad.setBaseColor(base); 32 | complementTriad.setBaseColor(base); 33 | monochrome.setBaseColor(base); 34 | monochromeBrightness.setBaseColor(base); 35 | analogue.setBaseColor(base); 36 | random.setBaseColor(base); 37 | 38 | 39 | complement.generateComplementary(); 40 | complementBrightness.generateComplementary(ofxColorPalette::BRIGHTNESS); 41 | triad.generateTriad(); 42 | complementTriad.generateComplementaryTriad(); 43 | monochrome.generateMonoChromatic(); 44 | monochromeBrightness.generateMonoChromatic(ofxColorPalette::BRIGHTNESS); 45 | analogue.generateAnalogous(); 46 | 47 | } 48 | 49 | //-------------------------------------------------------------- 50 | void ofApp::draw(){ 51 | ofBackground(255); 52 | 53 | 54 | //--begin 55 | ofPushMatrix(); 56 | for (int i = 0 ; i < triad.size(); i++) { 57 | ofSetColor(triad[i]); 58 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 59 | ofTranslate(RECT_SIZE, 0); 60 | } 61 | ofPopMatrix(); 62 | ofPushMatrix(); 63 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 64 | ofSetColor(0); 65 | ofDrawBitmapString("Triad", 0, 0); 66 | ofPopMatrix(); 67 | ofTranslate(0, RECT_SIZE + PADDING); 68 | // ---- 69 | ofPushMatrix(); 70 | for (int i = 0 ; i < complementTriad.size(); i++) { 71 | ofSetColor(complementTriad[i]); 72 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 73 | ofTranslate(RECT_SIZE, 0); 74 | } 75 | ofPopMatrix(); 76 | ofPushMatrix(); 77 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 78 | ofSetColor(0); 79 | ofDrawBitmapString("Complement Triad", 0, 0); 80 | ofPopMatrix(); 81 | ofTranslate(0, RECT_SIZE + PADDING); 82 | // ---- 83 | ofPushMatrix(); 84 | for (int i = 0 ; i < complement.size(); i++) { 85 | ofSetColor(complement[i]); 86 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 87 | ofTranslate(RECT_SIZE, 0); 88 | } 89 | ofPopMatrix(); 90 | ofPushMatrix(); 91 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 92 | ofSetColor(0); 93 | ofDrawBitmapString("Complement (Saturation)", 0, 0); 94 | ofPopMatrix(); 95 | ofTranslate(0, RECT_SIZE + PADDING); 96 | // ---- 97 | ofPushMatrix(); 98 | for (int i = 0 ; i < complementBrightness.size(); i++) { 99 | ofSetColor(complementBrightness[i]); 100 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 101 | ofTranslate(RECT_SIZE, 0); 102 | } 103 | ofPopMatrix(); 104 | ofPushMatrix(); 105 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 106 | ofSetColor(0); 107 | ofDrawBitmapString("Complement (Brightness)", 0, 0); 108 | ofPopMatrix(); 109 | ofTranslate(0, RECT_SIZE + PADDING); 110 | // ---- 111 | ofPushMatrix(); 112 | for (int i = 0 ; i < monochrome.size(); i++) { 113 | ofSetColor(monochrome[i]); 114 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 115 | ofTranslate(RECT_SIZE, 0); 116 | } 117 | ofPopMatrix(); 118 | ofPushMatrix(); 119 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 120 | ofSetColor(0); 121 | ofDrawBitmapString("Monochrome (Saturation)", 0, 0); 122 | ofPopMatrix(); 123 | ofTranslate(0, RECT_SIZE + PADDING); 124 | // ---- 125 | ofPushMatrix(); 126 | for (int i = 0 ; i < monochromeBrightness.size(); i++) { 127 | ofSetColor(monochromeBrightness[i]); 128 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 129 | ofTranslate(RECT_SIZE, 0); 130 | } 131 | ofPopMatrix(); 132 | ofPushMatrix(); 133 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 134 | ofSetColor(0); 135 | ofDrawBitmapString("Monochrome (Brightness)", 0, 0); 136 | ofPopMatrix(); 137 | ofTranslate(0, RECT_SIZE + PADDING); 138 | // ---- 139 | ofPushMatrix(); 140 | for (int i = 0 ; i < analogue.size(); i++) { 141 | ofSetColor(analogue[i]); 142 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 143 | ofTranslate(RECT_SIZE, 0); 144 | } 145 | ofPopMatrix(); 146 | ofPushMatrix(); 147 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 148 | ofSetColor(0); 149 | ofDrawBitmapString("Analogue", 0, 0); 150 | ofPopMatrix(); 151 | ofTranslate(0, RECT_SIZE + PADDING); 152 | // ---- 153 | ofPushMatrix(); 154 | for (int i = 0 ; i < random.size(); i++) { 155 | ofSetColor(random[i]); 156 | ofRect(0, 0, RECT_SIZE, RECT_SIZE); 157 | ofTranslate(RECT_SIZE, 0); 158 | } 159 | ofPopMatrix(); 160 | ofPushMatrix(); 161 | ofTranslate(ofGetWidth()/2, RECT_SIZE /2); 162 | ofSetColor(0); 163 | ofDrawBitmapString("Random (Click to regenerate)", 0, 0); 164 | ofPopMatrix(); 165 | 166 | ofTranslate(10, RECT_SIZE+PADDING); 167 | string info = "Press key for (s)aturation or (b)rightness \n"; 168 | info += "x-Axis (hue):" + ofToString(complement[0].getHue()) + "\n"; 169 | string modeString; 170 | float modeValue; 171 | if(mode == ofxColorPalette::SATURATION){ 172 | modeString = " (saturation)"; 173 | modeValue = saturation; 174 | }else { 175 | modeString = " (brightness)"; 176 | modeValue = brightness; 177 | } 178 | info += "y-Axis " + modeString + ofToString(modeValue) + "\n"; 179 | ofDrawBitmapString(info,0,0); 180 | 181 | } 182 | 183 | //-------------------------------------------------------------- 184 | void ofApp::keyPressed(int key){ 185 | if (key == 's') { 186 | mode = ofxColorPalette::SATURATION; 187 | }else if (key == 'b'){ 188 | mode = ofxColorPalette::BRIGHTNESS; 189 | } 190 | 191 | } 192 | 193 | //-------------------------------------------------------------- 194 | void ofApp::keyReleased(int key){ 195 | 196 | } 197 | 198 | //-------------------------------------------------------------- 199 | void ofApp::mouseMoved(int x, int y ){ 200 | 201 | } 202 | 203 | //-------------------------------------------------------------- 204 | void ofApp::mouseDragged(int x, int y, int button){ 205 | 206 | } 207 | 208 | //-------------------------------------------------------------- 209 | void ofApp::mousePressed(int x, int y, int button){ 210 | random.generateRandom(); 211 | 212 | } 213 | 214 | //-------------------------------------------------------------- 215 | void ofApp::mouseReleased(int x, int y, int button){ 216 | 217 | } 218 | 219 | //-------------------------------------------------------------- 220 | void ofApp::windowResized(int w, int h){ 221 | 222 | } 223 | 224 | //-------------------------------------------------------------- 225 | void ofApp::gotMessage(ofMessage msg){ 226 | 227 | } 228 | 229 | //-------------------------------------------------------------- 230 | void ofApp::dragEvent(ofDragInfo dragInfo){ 231 | 232 | } 233 | -------------------------------------------------------------------------------- /example-simpleExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxColorPalette.h" 5 | 6 | class ofApp : public ofBaseApp{ 7 | 8 | public: 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | void keyReleased(int key); 15 | void mouseMoved(int x, int y ); 16 | void mouseDragged(int x, int y, int button); 17 | void mousePressed(int x, int y, int button); 18 | void mouseReleased(int x, int y, int button); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | 23 | ofxColorPalette complement; 24 | ofxColorPalette complementBrightness; 25 | ofxColorPalette triad; 26 | ofxColorPalette complementTriad; 27 | ofxColorPalette monochrome; 28 | ofxColorPalette monochromeBrightness; 29 | ofxColorPalette analogue; 30 | ofxColorPalette random; 31 | 32 | ofxColorPalette::ColorChannel mode; 33 | float brightness; 34 | float saturation; 35 | 36 | }; 37 | -------------------------------------------------------------------------------- /images/example-colorPalette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/like-a-bause/ofxColorPalette/3ad0e3007bbf135770f9b11b2f5614397d6274da/images/example-colorPalette.png -------------------------------------------------------------------------------- /ofxaddons_thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/like-a-bause/ofxColorPalette/3ad0e3007bbf135770f9b11b2f5614397d6274da/ofxaddons_thumbnail.png -------------------------------------------------------------------------------- /src/ofxColorPalette.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | 3 | #include "ofxColorPalette.h" 4 | 5 | template 6 | ofxColorPalette_::ofxColorPalette_(): _baseColor(ofColor_::limit(),ofColor_::limit(),ofColor_::limit()){} 7 | 8 | template 9 | ofxColorPalette_::ofxColorPalette_(ofColor_ baseColor) : _baseColor(baseColor) 10 | { 11 | } 12 | 13 | template 14 | ofxColorPalette_::~ofxColorPalette_(){} 15 | 16 | template 17 | void ofxColorPalette_::setBaseColor(ofColor_ col) 18 | { 19 | _baseColor = col; 20 | } 21 | 22 | 23 | // ### Generators 24 | template 25 | void inline ofxColorPalette_::initGen(){ 26 | _palette.clear(); 27 | _palette.push_back(_baseColor); 28 | } 29 | 30 | // # Random 31 | template 32 | void ofxColorPalette_::generateRandom(int numColors) 33 | { 34 | initGen(); 35 | for(int i = 0; i < numColors -1; i++) 36 | { 37 | _palette.push_back(ofColor_(ofRandom(_baseColor.limit()),ofRandom(_baseColor.limit()),ofRandom(_baseColor.limit()))); 38 | } 39 | } 40 | 41 | // # Monochromatic 42 | template 43 | void ofxColorPalette_::generateMonoChromatic(ColorChannel channel, int numColors) 44 | { 45 | initGen(); 46 | 47 | //The base Color is the brightest of the generated 48 | float value; 49 | switch (channel) { 50 | case SATURATION: 51 | value = _baseColor.getSaturation(); 52 | break; 53 | case BRIGHTNESS: 54 | value = _baseColor.getBrightness(); 55 | break; 56 | default: 57 | break; 58 | } 59 | 60 | PixelType b = _baseColor.getBrightness(); 61 | float steps = value / numColors; 62 | for (int i = 1; i < numColors; i++) { 63 | // _palette.push_back(ofColor_::fromHsb(_baseColor.getHue(),_baseColor.getSaturation(), b - i*steps)); 64 | 65 | switch (channel) { 66 | case SATURATION: 67 | _palette.push_back(ofColor_::fromHsb(_baseColor.getHue(),value - i* steps,_baseColor.getBrightness())); 68 | break; 69 | case BRIGHTNESS: 70 | _palette.push_back(ofColor_::fromHsb(_baseColor.getHue(),_baseColor.getSaturation(),value - i* steps)); 71 | break; 72 | default: 73 | break; 74 | } 75 | } 76 | } 77 | 78 | // # Complementary 79 | template 80 | void ofxColorPalette_::generateComplementary(ColorChannel channel, int numColors) 81 | { 82 | initGen(); 83 | //hack only even numbers allowed, otherwise the code will bloat out. 84 | if (numColors % 2 == 1) { 85 | numColors -= 1; 86 | } 87 | float value; 88 | switch (channel) { 89 | case SATURATION: 90 | value = _baseColor.getSaturation(); 91 | break; 92 | case BRIGHTNESS: 93 | value = _baseColor.getBrightness(); 94 | break; 95 | default: 96 | break; 97 | } 98 | // base is again brightest for now, second enum to define the "direction" {toBlack to White}? 99 | int numLeft = numColors/2; 100 | float stepSize = (2 * value) / numColors; 101 | for (int i = 1; i < numLeft; i++) { 102 | value -= stepSize; 103 | switch (channel) { 104 | case SATURATION: 105 | _palette.push_back(ofColor_::fromHsb(_baseColor.getHue(),value,_baseColor.getBrightness())); 106 | break; 107 | case BRIGHTNESS: 108 | _palette.push_back(ofColor_::fromHsb(_baseColor.getHue(),_baseColor.getSaturation(),value)); 109 | break; 110 | default: 111 | break; 112 | } 113 | 114 | } 115 | 116 | ofColor_ complement = _baseColor.invert(); 117 | for (int i = 1; i < numColors - numLeft; i++) { 118 | switch (channel) { 119 | case SATURATION: 120 | _palette.push_back(ofColor_::fromHsb(complement.getHue(),value,complement.getBrightness())); 121 | break; 122 | case BRIGHTNESS: 123 | _palette.push_back(ofColor_::fromHsb(complement.getHue(),complement.getSaturation(),value)); 124 | break; 125 | default: 126 | break; 127 | } 128 | value += stepSize; 129 | 130 | } 131 | _palette.push_back(complement); 132 | 133 | } 134 | 135 | // # Triad 136 | template 137 | void ofxColorPalette_::generateTriad() 138 | { 139 | initGen(); 140 | float hue = _baseColor.getHue(); 141 | float stepSize = ofColor_::limit()/3; 142 | _palette.push_back(ofColor_::fromHsb(normalizeValue(hue + stepSize),_baseColor.getSaturation(),_baseColor.getBrightness())); 143 | _palette.push_back(ofColor_::fromHsb(normalizeValue(hue + 2 * stepSize),_baseColor.getSaturation(),_baseColor.getBrightness())); 144 | } 145 | 146 | // # Complementary Triad 147 | template 148 | void ofxColorPalette_::generateComplementaryTriad(float spread) 149 | { 150 | initGen(); 151 | ofColor_ complement = _baseColor.invert(); 152 | float hue = complement.getHue(); 153 | spread = spread * ofColor_::limit(); 154 | _palette.push_back(ofColor_::fromHsb(normalizeValue(hue - spread),complement.getSaturation(),complement.getBrightness())); 155 | _palette.push_back(ofColor_::fromHsb(normalizeValue(hue + spread),complement.getSaturation(),complement.getBrightness())); 156 | } 157 | 158 | // # Analogous 159 | template 160 | void ofxColorPalette_::generateAnalogous(int numColors, float spread) 161 | { 162 | //TODO Maybe the base Color should be in the middle here. 163 | 164 | initGen(); 165 | float hue = _baseColor.getHue(); //between 0 and limit() 166 | float stepSize = spread / numColors;// distribute the colors accross range 167 | stepSize = stepSize * ofColor_::limit(); // scale to PixelType 168 | numColors -=1; 169 | 170 | int numLeft = numColors / 2; 171 | //fill in left colors 172 | float newHue; 173 | for (int i = 1; i <= numLeft ; i++) { 174 | newHue = normalizeValue(hue - i * stepSize); 175 | _palette.push_back(ofColor_::fromHsb(newHue,_baseColor.getSaturation(),_baseColor.getBrightness())); 176 | } 177 | //fill in right colors 178 | for (int i = 1; i <= numColors- numLeft; i++) { 179 | newHue = normalizeValue(hue + i * stepSize); 180 | _palette.push_back(ofColor_::fromHsb(newHue,_baseColor.getSaturation(),_baseColor.getBrightness())); 181 | } 182 | } 183 | 184 | template 185 | ofColor_ & ofxColorPalette_::getRandom(){ 186 | return _palette[floor(ofRandom(0,size() -1) + 0.5)]; 187 | } 188 | 189 | template 190 | const ofColor_ & ofxColorPalette_::operator [] (int n) const{ 191 | return _palette[n]; 192 | } 193 | 194 | template 195 | ofColor_ & ofxColorPalette_::operator [] (int n){ 196 | return _palette[n]; 197 | } 198 | template 199 | int ofxColorPalette_::size() 200 | { 201 | return _palette.size(); 202 | } 203 | 204 | template 205 | float ofxColorPalette_::normalizeValue(float val) 206 | { 207 | float limit = ofColor_::limit(); 208 | if(val > limit) 209 | { 210 | return val - limit; 211 | } else if(val < 0) 212 | { 213 | return limit + val; 214 | } else 215 | { 216 | return val; 217 | } 218 | } 219 | 220 | template class ofxColorPalette_; 221 | template class ofxColorPalette_; 222 | template class ofxColorPalette_; 223 | template class ofxColorPalette_; 224 | template class ofxColorPalette_; 225 | template class ofxColorPalette_; 226 | template class ofxColorPalette_; 227 | template class ofxColorPalette_; 228 | template class ofxColorPalette_; 229 | template class ofxColorPalette_; -------------------------------------------------------------------------------- /src/ofxColorPalette.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include "ofColor.h" 3 | 4 | template 5 | class ofxColorPalette_ { 6 | 7 | public: 8 | /// \brief The Channel which should be the modifier for some Generators 9 | /// generateMonoChromatic, generateComplementary, 10 | enum ColorChannel{ 11 | SATURATION, 12 | BRIGHTNESS 13 | }; 14 | ofxColorPalette_(); 15 | ofxColorPalette_(ofColor_ baseColor); 16 | ~ofxColorPalette_(); 17 | 18 | // Sets the Base Color for the Generators 19 | void setBaseColor(ofColor_ col); 20 | 21 | //### Generators 22 | void inline initGen(); 23 | 24 | /// \brief generates random colors 25 | void generateRandom(int numColors=4); 26 | 27 | /// \brief generates a monochromatic color palette 28 | /// for now the base color is the brightest in the palette 29 | void generateMonoChromatic(ColorChannel channel = SATURATION, int numColors = 4); 30 | 31 | /// \brief generates a palette with a fade to the Complementary Color 32 | /// 33 | void generateComplementary(ColorChannel channel = SATURATION, int numColors = 4); 34 | 35 | /// \brief generates 3 colors evenly distributed in hue space 36 | void generateTriad(); 37 | 38 | /// \brief generates a palette with the complementary triad 39 | /// generates a palette of 3 colors 40 | /// see http://en.wikipedia.org/wiki/Color_scheme#Split-Complementary for description 41 | void generateComplementaryTriad(float spread = 0.083); 42 | 43 | /// \brief generates a palette of analogous colors 44 | /// \param numColors the number of Colors which should be generated 45 | /// \param spread the area (between 0-1) in which the hue is expanded 46 | void generateAnalogous(int numColors = 5, float spread = 0.2); 47 | 48 | /// \brief get a reference to a random Color which is IN the palette 49 | ofColor_ & getRandom(); 50 | 51 | //### Operator overloading 52 | const ofColor_ & operator [] (int n) const; 53 | ofColor_ & operator [] (int n); 54 | 55 | /// \brief returns the size of the palette 56 | int size(); 57 | 58 | private: 59 | ofColor_ _baseColor; 60 | vector > _palette; 61 | 62 | // used to "wrap around" values to PixelType.limit() (1.27 becomes 0.27, -0.3 becomes 0.7) 63 | float normalizeValue(float val); 64 | }; 65 | 66 | typedef ofxColorPalette_ ofxColorPalette; 67 | typedef ofxColorPalette_ ofxShortColorPalette; 68 | typedef ofxColorPalette_ ofxFloatColorPalette; --------------------------------------------------------------------------------