Skip to content

Instantly share code, notes, and snippets.

View josepablo-espinoza's full-sized avatar

Jose Pablo Espinoza Barahona josepablo-espinoza

View GitHub Profile
@josepablo-espinoza
josepablo-espinoza / krita-pickcolor-shortcut.py
Created August 9, 2024 21:00
picks color under the cursor by shortcut
from krita import * # type: ignore
from PyQt5.QtCore import QPointF
from PyQt5.QtGui import QImage, QTransform, QCursor
from PyQt5.QtWidgets import QMdiArea, QAbstractScrollArea
import math
'''
pickcolor shortcut for Krita:
picks color under the cursor by shortcut
This script is based on https://github.com/seguso/KritaColorPlus
from krita import * # type: ignore
from PyQt5.QtGui import QColor
import random
'''
HSVshifter for Krita:
This script uses the background color to generate
a new color based on the following ranges to shift:
hue_range
sat_range
from krita import * # type: ignore
from time import time
from PyQt5.QtCore import QByteArray
'''
Pseudo Pixel Perfect (PPP) post-process for Krita:
It removes double pixels (in an L-shaped configuration)
and then thins it using the Zhang-Suen thinning algorithm,
aiming to recreate the feel of a pixel-perfect stabilization brush.