Skip to content

Instantly share code, notes, and snippets.

View KelSolaar's full-sized avatar
🔅
Bending Light

Thomas Mansencal KelSolaar

🔅
Bending Light
View GitHub Profile
@KelSolaar
KelSolaar / inkscape.py
Last active October 10, 2021 06:42
Inkscape - macOs - Absolute Path Wrapper
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Inkscape - macOs - Absolute Path Wrapper
========================================
On *macOs*, *Inkscape* requires absolute paths to work::
https://answers.launchpad.net/inkscape/+question/280575
@KelSolaar
KelSolaar / colour-0.4.7-current-changes.md
Last active July 18, 2025 06:08
Colour 0.4.7 - Current Changes

Colour 0.4.7 - Alpha Milestone

Features

colour.adaptation

  • Implement support for Li (2025) chromatic adaptation transform with colour.chromatic_adaptation_Li2025 definition. (#1349, #1356, @UltraMo114, @KelSolaar, Claude Code)

colour.appearance

@KelSolaar
KelSolaar / colour_examples_and_unit_tests_recommended_values.py
Last active June 27, 2019 11:58
Recommended Values for Use in Colour Examples and Unit Tests
@KelSolaar
KelSolaar / mitsuba_export_spds.py
Last active October 12, 2018 19:05
Mitsuba - Shader Balls
for name, spd in SPDS.items():
prefix = ''.join([token.title() for token in spd.name.split()])
prefix = prefix.replace('.', '_')
prefix = prefix.replace('(', '_')
prefix = prefix.replace(')', '_')
filename = '/Users/kelsolaar/Google Drive/Cinematic Color Update/Supporting Documents/Spectral/ShaderBalls/ColorChecker N Ohta/{0}.spd'.format(prefix)
colour.write_spds_to_csv_file({spd.name: spd}, filename, delimiter=' ')
with open(filename, 'r') as csv_file:
@KelSolaar
KelSolaar / three_js_helpers.py
Created July 19, 2018 09:58
Three.js - Helpers
def face_mask(
quad=False,
material=False,
face_uvs=False,
face_vertex_uvs=False,
face_normals=False,
face_vertex_normals=False,
face_colours=False,
face_vertex_colours=False,
@KelSolaar
KelSolaar / colour_blender.py
Created July 9, 2018 10:23
Colour - Blender
import bpy
from colour.models import RGB_COLOURSPACES, RGB_to_XYZ, \
XYZ_to_colourspace_model
def RGB_identity_cube(subdivisions=32):
bpy.ops.mesh.primitive_cube_add(location=(0.5, 0.5, 0.5))
bpy.ops.transform.resize(value=(0.5, 0.5, 0.5))
bpy.ops.object.transform_apply(location=True, scale=True)
wavelength HeNe Laser
301.2475431 121.7295551
303.5565712 123.2564968
305.8655993 120.5549846
308.1746274 122.0819263
310.4836555 120.9073557
312.7926836 120.7898987
315.1017117 120.3200705
317.4107398 121.377184
319.719768 121.8470122
@KelSolaar
KelSolaar / invoke.sh
Last active July 9, 2018 04:53
Docker - Bash Shell Helpers
#!/usr/bin/env bash
# Container Information
CONTAINER_IMAGE="nginx:latest"
CONTAINER_NAME="nginx"
# Container Run Command
run-container() {
docker run \
-d \
--restart always \
@KelSolaar
KelSolaar / nginx.conf
Created June 16, 2018 07:57 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@KelSolaar
KelSolaar / V35_IDT.nkp
Created May 28, 2018 07:42
Panasonic Varicam V35 IDT
set cut_paste_input [stack 0]
version 10.5 v2
push $cut_paste_input
Expression {
temp_name0 cutInv
temp_expr0 0.181
temp_name1 b_
temp_expr1 0.00873
temp_name2 c
temp_expr2 0.241514